This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes why PATH environment is wrong in Java application? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "why PATH environment is wrong in Java application?" Watch "why PATH environment is wrong in Java application?" New topic
Author

why PATH environment is wrong in Java application?

Zee Ho
Ranch Hand

Joined: Jul 20, 2004
Posts: 128
Hi all,
I am using Mac OSX and JDK 1.6, I failed to launch a new process from java because of the environment variable PATH.

If I run new ProcessBuilder().environment(), it only contains the


but if I run



why the PATH is different between my java app and console? I am using the same user to run command and launch my java application.

I did google it, but failed to find anything useful.

waiting for your reply. cheers.


SCJP 1.4<br />SCWCD 1.3<br />SCJD<br />SCBCD<br />IBM Xml Cert in progress
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why PATH environment is wrong in Java application?