Tuesday 1 May 2012

Reading environment variable in Java

Following example helps to read environment variable.
 
 
package com.lac.demo;

public class ReadEnv {
 public static void main(String[] args) {
  //Reads environment variable PATH
  String value=System.getenv("PATH");
  System.out.println(value);
 }
}

Click here to download source from www.luckyacademy.com

No comments:

Post a Comment