Eclipse IDE Environment [message #526908] |
Tue, 13 April 2010 09:31  |
Eclipse User |
|
|
|
I've got the following code:
process = Runtime.getRuntime().exec("gs -version");
When I compile it and run it from command line, it's successful.
But when I run it from the Eclipse IDE it throws an exception.
When I replace "gs" with the full path it works (in both Eclipse and Command Line).
I've tried setting the environment variable in run configuration but it still doesn't work.
Here's the stack trace:
java.io.IOException: Cannot run program "gs": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:328)
at clris.batchdownloader.TestJDBC.main(TestJDBC.java:17)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 4 more
My "Environment Variable" Path Entry:
Variable: gs
Value: /opt/local/bin/gs
Any thoughts??
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05953 seconds