TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Displaying System details in Java
Alagunila Meganathan
Aug 02
2016
Code
375
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
EnvironmentInformati
import
java.util.Map;
import
java.util.Set;
import
java.util.Iterator;
public
class
EnvironmentInformation{
public
static
void
main(String[] args){
Map map = System.getenv();
Set keys = map.keySet();
Iterator iterator = keys.iterator();
System.out.println(
"Variable Name \t Variable Values"
);
while
(iterator.hasNext()){
String key = (String) iterator.next();
String value = (String) map.get(key);
System.out.println(key +
" "
+ value);
}
}
}
Java