Results 1 to 4 of 4
  1. #1
    tonnnys is offline Member
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default Set an environment variable

    hi, I need to read a value for an external application (Delphi) created with a javascript, I thought using a environment variable - Java creates the variable, the other program reads it, just I dont know how :(
    a small example would be great :)
    thanks

    Tonnys

    PS Sorry my english .

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,305
    Blog Entries
    7
    Rep Power
    20

    Default Re: Set an environment variable

    Use a ProcessBuilder to construct your other process; a ProcessBuilder has a modifiable environment map. Read the API documentation for this class.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    tonnnys is offline Member
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default Re: Set an environment variable

    Tnks for the quick reply, but a small example would be great..... I've searched all over the net but didn´t find any working staff

    thank you

    Tonnys

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,751
    Rep Power
    19

    Default Re: Set an environment variable

    Then you must have failed to look at the ProcessBuilder API, where this is explained in great detail.

    That should have been your first stop off point.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. load environment variable before application run
    By anchitanc in forum New To Java
    Replies: 4
    Last Post: 01-02-2012, 05:51 PM
  2. Environment variable shows different from editable value
    By projecttoday in forum New To Java
    Replies: 6
    Last Post: 12-01-2010, 12:47 AM
  3. Setting the environment variable for j2sdk
    By kiki2009 in forum Java Servlet
    Replies: 3
    Last Post: 07-04-2009, 05:14 AM
  4. set environment variable in unix using java program
    By java_kick in forum Advanced Java
    Replies: 3
    Last Post: 03-16-2009, 12:26 PM
  5. Passing Environment Variable in Eclipse Europa
    By ajaymenon.k in forum Eclipse
    Replies: 0
    Last Post: 11-19-2007, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •