How to find value of Environment variables in Java

Tutorials Shared by the Internet Community

Advertisements


Synopsis

In order to get value of Environment variables in Java, you can use System.getEnv() method. By using this method you can either get value of single sp

Statistics

  • Total Hits - 26857

  • Total Votes - 98 votes

  • Vote Up - 42 votes

  • Vote Down - 56 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/JAVA Misc

  • Submitted By - Javin Paul

  • Submitted on - 2013-01-06 07:47:02

Description

In order to get value of Environment variables in Java, you can use System.getEnv() method. By using this method you can either get value of single specific environment variable e.g. JAVA_HOME or you can get full list of environment variable and then iterate over them using loop or Iterator in Java. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements