[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
How to launch the command-line from a Java application ?  XML
Forum Index » New to Java
Author Message
jphilve

Newbie

Joined: 07/05/2009 17:30:22
Messages: 1
Offline

Hi,
I'm new in Java programming , and I would want to open a command-line window from a Java application, and at the opening of this command-line window, I would want the current directory to be a directory specified from my Java application, for instance , if in my Java application , I specify the directory "D:\MyProjects\Project1", I would want that at the opening of the command-line, the current directory is "D:\MyProjects\Project1".
Please, how to do this ?
Thanks.
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Take a look at the Runtime.exec() method. Remember that if you change directories in Java it will not affect the running process. You'll have to do that a different way.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
 
Forum Index » New to Java
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle