How to set Environment Variables in Java: Path and Classpath

Configurare noua (How To)

Situatie

The PATH variable gives the location of executables like javac, java etc. It is possible to run a program without specifying the PATH but you will need to give full path of executable like C:\Program Files\Java\jdk1.8.0_271\bin\javac A.java instead of simple javac A.java

The CLASSPATH variable gives location of the Library Files. Let’s look into the steps to set the PATH and CLASSPATH.

Solutie

Pasi de urmat
  • Right Click on the My Computer and Select the properties

  • Click on advanced system settings

  • Click on Environment Variables

  • Click on new Button of User variables

  • Type PATH in the Variable name.

  • Copy the path of bin folder which is installed in JDK folder.

  • Paste Path of bin folder in Variable value. Click on OK Button.

Tip solutie

Permanent

Voteaza

(3 din 8 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?