user
Task: What environment variables are necessary to run a Java program?


assistant
The following environment variables are necessary to run a Java program: 

JAVA_HOME, which specifies the directory where the Java runtime environment is installed; PATH, which specifies the directories where executable programs are located; and CLASSPATH, which specifies the locations of Java class files.