Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How can I execute a executable file with SWT?
How can I execute a executable file with SWT? [message #449752] Fri, 28 January 2005 16:19 Go to next message
Jesse is currently offline JesseFriend
Messages: 3
Registered: July 2009
Junior Member
Hi
Re: How can I execute a executable file with SWT? [message #449798 is a reply to message #449752] Sat, 29 January 2005 22:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gilblais.yahoo.com

Jesse - here is a snippet that will work for you.
--- cut here ---
String cmdline = "C:\\mybatchfile.bat";
try {
// Next line starts the process on a separate thread....
Process p = Runtime.getRuntime().exec(cmdline);
p.waitFor(); // optional
}
catch (Exception err) { err.printStackTrace(); }
--- end of snippet ---
"Jesse" <denghaitao@jctx.com> wrote in message
news:ctdonv$d4v$1@www.eclipse.org...
> Hi
Re: How can I execute a executable file with SWT? [message #449922 is a reply to message #449752] Mon, 31 January 2005 15:41 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet105.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

Grant

"Jesse" <denghaitao@jctx.com> wrote in message
news:ctdonv$d4v$1@www.eclipse.org...
> Hi
Previous Topic:SashForm - Need sticky component
Next Topic:What changed in CTabFolder from M2 to M3?
Goto Forum:
  


Current Time: Tue Apr 16 05:46:55 GMT 2024

Powered by FUDForum. Page generated in 1.34164 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top