|Can't run /usr/bin/ command in Eclipse java application? [message #931952]
||Wed, 03 October 2012 17:30
| Missing name Mising name
Registered: November 2010
Hello, I am developing a Java application in Eclipse on Mac Pro, similar to Linux environment.|
In my code I need to do something like:
Runtime rt = Runtime.getRuntime();
String cmd = "ttg " + inFileName + " -o" + outFileName;
"ttg" is installed under /usr/bin and can be executed in a terminal, but can't be executed here in Eclipse. I have to specify the full path:
String cmd = "/usr/bin/ttg " + inFileName + " -o" + outFileName;
Under Windows, we can set this through Environment Variables. why the application in Eclipse can't call "ttg" without specifying the full path?
Any way out? Thanks.
[Updated on: Wed, 03 October 2012 17:31]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01525 seconds