Results 1 to 1 of 1
- 10-28-2011, 08:51 PM #1
Member
- Join Date
- Oct 2011
- Posts
- 1
- Rep Power
- 0
Linux - Reading custom environmental variables
Hey guys,
I'm trying to read an environmental variable in Java withI addedJava Code:System.getenv("FOO");to ~/.bashrc and then used source ~/.bashrc.Java Code:export FOO=/some/path
Withthe env variable shows up in the terminal, but if I want to retrieve this variable withJava Code:echo $FOO
only null is returned and I have no clue how to fix this.Java Code:System.getenv("FOO");
Using the method on variables like "USER" etc. works just fine.
If anybody has some experience how to deal with this problem, please let me know.
Thank you very much.
Alex
Similar Threads
-
Evaluate the environmental flexibility of programming in Java?
By azzic7 in forum New To JavaReplies: 2Last Post: 06-26-2010, 09:18 PM -
reading values into variables using java
By kskgupta in forum New To JavaReplies: 2Last Post: 05-16-2010, 05:48 AM -
Reading in a line of data and splitting the line up into variables
By guru32 in forum New To JavaReplies: 9Last Post: 04-07-2009, 03:51 AM -
Sharing variables between 2 custom components. Please help.
By dcojocaru in forum New To JavaReplies: 2Last Post: 07-22-2007, 12:01 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks