Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

java runtime.exec, is this possible?

Thread view: 
BigCohunes@gmail.com - 17 Sep 2006 14:28 GMT
I would like my java app to launch an external program.  The external
program is the Windows Command Processor (cmd.exe).

I would like my java app to launch it as it's own separate process.  So
I would like a new window to appear, with the prompt showing.  I can't
figure out how to have my app launch the cmd window such that i can
physically see it.  (i do see it in my process manager, but no gui for
it?)

I can't seem to figure this out.  Is it possible to have my java app
launch the cmd.exe,  then have the java app exit, but leave me with the
new window that came up when my app launched cmd.exe.

Any idea's?

Thanks
Knute Johnson - 17 Sep 2006 17:26 GMT
> I would like my java app to launch an external program.  The external
> program is the Windows Command Processor (cmd.exe).
[quoted text clipped - 12 lines]
>
> Thanks

START

Signature

Knute Johnson
email s/nospam/knute/

BigCohunes@gmail.com - 18 Sep 2006 14:24 GMT
> > I would like my java app to launch an external program.  The external
> > program is the Windows Command Processor (cmd.exe).
[quoted text clipped - 19 lines]
> Knute Johnson
> email s/nospam/knute/

using "start" solved my problem!

String cmd[] = {"cmd", "/C", "start", startPath, arg};

Thanks,

-Mike
Rodrigo Zechin - 18 Sep 2006 13:18 GMT
Try "cmd.exe /C app".
Type "help cmd" for more info.

Regards,
RZR


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.