•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 429,971 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,565 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 37603 | Replies: 7
![]() |
the code goes like this:
try
{
Runtime rt = Rintime.getRuntime() ;
Process p = rt.exec("Program.exe") ;
InputStream in = p.getInputStream() ;
OutputStream out = p.getOutputStream ();
InputSream err = p,getErrorStram() ;
//do whatever you want
//some more code
p.destroy() ;
}catch(Exception exc){/*handle exception*/} It's not wrong not knowing, but it's wrong not wanting to know.
•
•
Join Date: Jun 2004
Posts: 604
Reputation:
Rep Power: 6
Solved Threads: 6
Hi everyone,
The above codes only seem to run external .exe programs but what if i want to run external jar programs. Could someone show me or e-mail me the codings of how to do this the right way.
Thank You
Yours Sincerely
Richard West
The above codes only seem to run external .exe programs but what if i want to run external jar programs. Could someone show me or e-mail me the codings of how to do this the right way.
Thank You
Yours Sincerely
Richard West
Last edited by alc6379 : Oct 23rd, 2004 at 3:30 am. Reason: removed email address
•
•
Join Date: Oct 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
i'm using the code from above to try to run a program and here's my problem... when i call an exe that i wrote in VB, the program runs fine. if i call a c or c++ program the program loads into memory (i see it in the processes tab) but the console doesn't open up with the program in it.
here's the code i have right now for it...
here's the code i have right now for it...
try
{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("vbex.exe");
InputStream in = p.getInputStream();
OutputStream out = p.getOutputStream();
InputStream err = p.getErrorStream();
p.destroy() ;
}catch(Exception exc){/*handle exception*/}![]() |
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- run external program asociated with extension (C)
- ERROR C:\PROGRA~1\INTERN~1\iexplore.exe (Viruses, Spyware and other Nasties)
- comp. hijacked can't run sfc.exe (Viruses, Spyware and other Nasties)
Other Threads in the Java Forum
- Previous Thread: a good IDE for Java Struts?
- Next Thread: calling of any .exe



Linear Mode