Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

Setting an environment variable from another environment variable

Thread view: 
marcwentink@hotmail.com - 04 Apr 2007 10:08 GMT
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
Michael Rauscher - 04 Apr 2007 10:40 GMT
marcwentink@hotmail.com schrieb:
> Dear group,
>
[quoted text clipped - 5 lines]
> hence letting resin.home be equal to the value of the other
> environment variable RESIN_HOME?

Sure.

Bye
Michael
marcwentink@hotmail.com - 04 Apr 2007 11:02 GMT
> 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
Lew - 04 Apr 2007 12:54 GMT
> In the java executable startup, can I do something like:
>
> -Dresin.home=$RESIN_HOME or
> -Dresin.home=%RESIN_HOME%

Michael Rauscher <michlm...@gmx.de> wrote:
>> Sure.

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

Didn't you test it before posing the question?

Signature

Lew

marcwentink@hotmail.com - 04 Apr 2007 15:34 GMT
> 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?
Lew - 04 Apr 2007 23:39 GMT
>> Didn't you test it before posing the question?
>
[quoted text clipped - 4 lines]
> 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.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.