Setting environment variables from java

Discussion in 'Java' started by Karim, May 31, 2007.

  1. Karim

    Karim Guest

    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?

    Thanks
    Karim, May 31, 2007
    #1
    1. Advertising

  2. 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
    Robert Klemme, May 31, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick Kasten

    Setting Environment Variables

    Rick Kasten, Jul 7, 2004, in forum: Perl
    Replies:
    2
    Views:
    587
    Howard
    Jul 7, 2004
  2. Leo
    Replies:
    2
    Views:
    2,988
    Gordon Beaton
    Mar 21, 2006
  3. Replies:
    5
    Views:
    641
  4. Karim
    Replies:
    0
    Views:
    2,348
    Karim
    May 31, 2007
  5. Karim
    Replies:
    3
    Views:
    2,562
    Nigel Wade
    Jun 1, 2007
Loading...

Share This Page