• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing exe in Java

 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic