Setting environment variables to run the Eclipse IDE

I want to start a project in eclipse, but when I try to start eclipse it does not open. My instructor said that I would have to set environment variables. What is the importance of environment variables, such as PATH, CLASSPATH, JAVAHOMEand what are the correct values?

+4
source share
3 answers

So, Eclipse will know where Java is located.

JAVA_HOME is not used by Java itself. Some third-party programs (such as Apache Tomcat) expect one of these variables to be set in the JDK or JRE installation directory. If you are not using the required software, you do not need to install JAVA_HOME and JRE_HOME.

CLASSPATH is an environment variable that contains a list of directories and / or JAR files that Java looks through when it looks for Java classes to load. Normally you do not need to set the CLASSPATH environment variable. Instead of using this environment variable, you can use the -cp or -classpath option on the command line when using the javac and java commands.

PATH - , (Windows, Mac OS X, Linux), . bin JDK PATH, javac java JDK . JDK , PATH.

+6

Eclipse IDE Java . -, , PATH JAVA_HOME, . Java , , , , , PATH JAVA_HOME. , , Eclipse, , .

Classpath , , Java-, , Java.

0

, Eclipse? , , , JRE/JDK. . FAQ .

In short, you usually want your PATH variable to point to a java executable. Note that Eclipse does not use at all JAVA_HOME.

0
source

Source: https://habr.com/ru/post/1527287/


All Articles