Environment variables
import java.util.Iterator;
import java.util.Map;
public class Main {
public static void main(String args[]) {
System.out.println("PATH = " + System.getenv("PATH"));
Map env = System.getenv();
for (Iterator it = env.entrySet().iterator(); it.hasNext();) {
Map.Entry entry = (Map.Entry) it.next();
System.out.println(entry.getKey() + " = " + entry.getValue());
}
}
}
Home
Java Book
Runnable examples
Java Book
Runnable examples
System:
- Copy and paste string to and from System Clipboard
- Copy and paste image to and from System Clipboard
- Alert when Losting Clipboard owner
- System beeper
- Beep by printing the ASCII Bell character to the console
- Total amount of memory in Java virtual machine
- Maximum amount of memory in Java virtual machine
- Free amount of memory in Java Virtual Machine
- Environment variables