Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Java
Expertise: Advanced
Apr 2, 2001



Building the Right Environment to Support AI, Machine Learning and Deep Learning

How to Read NT System Properties

A direct method or class that will allow you to read NT system properties does not exist. However, it can be done as follows: Write a simple batch command file with a dos command to echo the value of the environment variable to a text file, then read the content of the file using methods from File and FileReader classes.
import java.io.*;
public class rtl
   public static void main(String args[])
      String command=
Sandeep Gain
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date