Setting an environment variable from another environment variable

Discussion in 'Java' started by marcwentink@hotmail.com, Apr 4, 2007.

  1. Guest

    Dear group,

    In the java executable startup, can I do something like:

    -Dresin.home=$RESIN_HOME or
    -Dresin.home=%RESIN_HOME%

    hence letting resin.home be equal to the value of the other
    environment variable RESIN_HOME?

    Marc
    , Apr 4, 2007
    #1
    1. Advertising

  2. schrieb:
    > Dear group,
    >
    > In the java executable startup, can I do something like:
    >
    > -Dresin.home=$RESIN_HOME or
    > -Dresin.home=%RESIN_HOME%
    >
    > hence letting resin.home be equal to the value of the other
    > environment variable RESIN_HOME?


    Sure.

    Bye
    Michael
    Michael Rauscher, Apr 4, 2007
    #2
    1. Advertising

  3. Guest

    On 4 apr, 11:40, Michael Rauscher <> wrote:

    > Sure.


    Great, works, tested it! Isn't life wonderful!

    import java.util.*;
    public class TestProps
    {
    public static void main(String[] args)
    {
    Properties p = System.getProperties();
    p.list(System.out);
    }
    }

    P:\Magdalena\school\Java\certificatie>java -Dresin.home=%RESIN_HOME%
    TestProps
    -- listing properties --
    .....
    resin.home=C:\java\resin-3.0.18
    , Apr 4, 2007
    #3
  4. Lew Guest

    wrote:
    > In the java executable startup, can I do something like:
    >
    > -Dresin.home=$RESIN_HOME or
    > -Dresin.home=%RESIN_HOME%


    Michael Rauscher <> wrote:
    >> Sure.


    wrote:
    > Great, works, tested it! Isn't life wonderful!


    Didn't you test it before posing the question?

    --
    Lew
    Lew, Apr 4, 2007
    #4
  5. Guest

    On 4 apr, 13:54, Lew <> wrote:

    > Didn't you test it before posing the question?


    No....

    I was just browsing and searching and found this java properties class
    after posing the question. I did search in google before posing the
    question though, but I could not find it. I hope you're not going to
    flame me now?
    , Apr 4, 2007
    #5
  6. Lew Guest

    wrote:
    > On 4 apr, 13:54, Lew <> wrote:
    >
    >> Didn't you test it before posing the question?

    >
    > No....
    >
    > I was just browsing and searching and found this java properties class
    > after posing the question. I did search in google before posing the
    > question though, but I could not find it. I hope you're not going to
    > flame me now?


    No, of course not! Gods forfend!

    I was just wondering.

    --
    Lew
    Lew, Apr 4, 2007
    #6
    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. Darrel
    Replies:
    1
    Views:
    293
    Scott Allen
    Oct 22, 2004
  2. Rahul S.
    Replies:
    3
    Views:
    600
    Flash Gordon
    Nov 1, 2004
  3. Ashton Fagg

    Setting an environment variable.

    Ashton Fagg, Jan 3, 2012, in forum: Python
    Replies:
    1
    Views:
    242
    Nobody
    Jan 3, 2012
  4. Une bévue
    Replies:
    3
    Views:
    135
    Une bévue
    Mar 10, 2006
  5. Pavel Ledin

    Setting Windows environment variable

    Pavel Ledin, Sep 20, 2006, in forum: Ruby
    Replies:
    2
    Views:
    164
    Pavel Ledin
    Sep 20, 2006
Loading...

Share This Page