Get Environment Variables Properties

import java.io.IOException;

public class GetEnvVariable {

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws System.out.println(System.getProperty(“user.dir”));

}

}

 

Other Environment Properties that can be used:

file.separator

java.specification.version

java.vm.version

java.class.path

java.vendor

line.separator

java.class.version

java.vendor.url

os.arch

java.compiler

java.version

os.name

java.ext.dirs

java.vm.name

os.version

java.home

java.vm.specification.name

path.separator

java.io.tmpdir

java.vm.specification.vendor

user.dir

java.library.path

java.vm.specification.version

user.home

java.specification.name

java.vm.vendor

user.name

java.specification.vendor

   

Advertisements

About qainterviews

Software Geek,QA Expert,Blogger
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s