What is the main need for an environment variable?

Hi, what is the main need for setting an environment variable while we are setting many languages. What is needed there? And is the set of settings installed (in the case of java)? Why is that?

+3
source share
2 answers

Environment variables are set to allow access to command line tools and allow other tools to more easily interact with the SDK. For example, with Java on Windows, if the environment variable is not set to PATH, running javac is much more cumbersome, because you need to enter the full path to the command every time:

C:> \jdk<version>\bin\javac MyClass.java

Java ; . , , . Path?, , .

Java , (, Microsoft). , Sun/Oracle, - .

+5

JAVA JDK, PATH, . , , (javac, java, javadoc ..) . PATH, , .

0

All Articles