Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get environment variable

 
Somasundaram Karthikeyan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get environment variable using java program? Environment variable means get the value of path, classpath like that. Please
help me . Thanks in advance.
K.Somasundaram
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can do a
System.getProperty() which returns the java.util.Properties object.
you can query that using
prop.getProperty("java.class.path") to get the class-path.
Pls check out all the available properties (keys) from
the Properties object.
karthik.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!