Re: Setting environment variables from java



On 31.05.2007 16:35, Karim wrote:
Hi,

Under linux, I have java code that runs a c executable using
Runtime.getRuntime().exec()

Before running that I have to set the LD_LIBRARY_PATH system
variable..

I tried Runtime.getRuntime().exec("setenv ....")
Runtime.getRuntime().exec("export ... ")

and I also tried System.setProperty();

and non of the above seem to do the trick..

any hints?

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#exec(java.lang.String[],%20java.lang.String[])

robert
.



Relevant Pages

  • IBMs JNI fails where Suns JNI works
    ... I'm dealing with a problem where the some java code, ... library (under linux) works fine under Sun's JVM, but as soon as we use ... IBMs VM things go horribly wrong in the native library. ...
    (comp.lang.java.programmer)
  • Setting environment variables from java
    ... Under linux, I have java code that runs a c executable using ... and non of the above seem to do the trick.. ... any hints? ...
    (comp.lang.java.programmer)
  • Setting environment variables from java
    ... Under linux, I have java code that runs a c executable using ... and non of the above seem to do the trick.. ... any hints? ...
    (comp.lang.java.programmer)
  • Setting environment variables from java
    ... Under linux, I have java code that runs a c executable using ... and non of the above seem to do the trick.. ... any hints? ...
    (comp.lang.java.programmer)