File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Accessing exe in Java    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Accessing exe in Java    " Watch "Accessing exe in Java    " New topic
Author

Accessing exe in Java

Thennam Pandian
Ranch Hand

Joined: Oct 11, 2005
Posts: 163
Dear Friends,

I know that we can access the exe in Java by the help of

Runtime & Process Class . But through this Class i can't able to

call exes other than windows default exe

( like notepad,Taskmanager,regedit. )



I can only call the exe in C:\WINNT Location . I can't able

to call other exe which are not in C:\WINNT Location .


how can i call exes which are not in C:\WINNT Location
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
With ProcessBuilder (new in 5) you can set up the environment pretty easily before launching your program. See if you can set the path or current directory to make yours work. This article covers many other gotchas and concerns with running external programs.
[ October 06, 2006: Message edited by: Stan James ]

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing exe in Java