The moose likes Java in General and the fly likes How to get the system variable in UNIX? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

How to get the system variable in UNIX?

Jamy Wang
Ranch Hand

Joined: Sep 21, 2003
Posts: 83
How can I get the system variables in UNIX?
I use Runtime.getRuntime().exec("echo $JAVA_HOME"), but it doesn't work.
Thank you in advance. Could anyone give me a complete example?


Best Regards<br /> <br />SCJP1.4 SCJD1.4 SCEA
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
Hi James,
You already got answers in Java in General (intermediate) forum here, so I am closing this thread. Please don't start the same topic in more than one forum; it wastes time for people who don't realize if something's already been answered elsewhere. Thanks!


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to get the system variable in UNIX?
 
Similar Threads
How will I restrict incoming mails from specific users in Unix?
java on Unix
jndi bindings in websphere on unix
UNIX
How to get the system variable in UNIX?