Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Setting an environment variable from another environment variable

Reply
Thread Tools

Setting an environment variable from another environment variable

 
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      04-04-2007
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

 
Reply With Quote
 
 
 
 
Michael Rauscher
Guest
Posts: n/a
 
      04-04-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      04-04-2007
On 4 apr, 11:40, Michael Rauscher <(E-Mail Removed)> 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

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      04-04-2007
(E-Mail Removed) wrote:
> In the java executable startup, can I do something like:
>
> -Dresin.home=$RESIN_HOME or
> -Dresin.home=%RESIN_HOME%


Michael Rauscher <(E-Mail Removed)> wrote:
>> Sure.


(E-Mail Removed) wrote:
> Great, works, tested it! Isn't life wonderful!


Didn't you test it before posing the question?

--
Lew
 
Reply With Quote
 
marcwentink@hotmail.com
Guest
Posts: n/a
 
      04-04-2007
On 4 apr, 13:54, Lew <(E-Mail Removed)> 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?

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      04-04-2007
(E-Mail Removed) wrote:
> On 4 apr, 13:54, Lew <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting an environment variable. Ashton Fagg Python 1 01-03-2012 08:29 PM
How to set another machine's environment variable? vinay.babu Software 0 10-16-2008 11:54 AM
Setting Windows environment variable Pavel Ledin Ruby 2 09-20-2006 10:01 AM
setting an environment variable (for libxml2) Une bévue Ruby 3 03-10-2006 07:20 AM
URGENT: Need help in setting environment variable.. pls help Rahul S. C Programming 3 11-01-2004 10:53 AM



Advertisments