I have installed the JRE (jre1.8.0_181) and the JDK (jdk1.8.0_111) on Windows 7.
I checked that the environment variables are well defined :
C:\Users\denis.beurive>echo %JAVA_HOME%
C:\Progra~1\Java\jdk1.8.0_111
C:\Users\denis.beurive>echo %CLASSPATH%
C:\Progra~1\Java\jdk1.8.0_111\lib
C:\Users\denis.beurive>echo %PATH%
...C:\Progra~1\Java\jdk1.8.0_111\bin;C:\Progra~2\Java\jre1.8.0_181\bin;...
And I made sure that the directories exist :
dir %JAVA_HOME%
dir %CLASSPATH%
dir C:\Progra~2\Java\jre1.8.0_181\bin
dir C:\Progra~1\Java\jdk1.8.0_111\bin
The directories exist.
Please note that I followed the recommendation that I found here, regarding the paths: JAVA_HOME variable
However, when a run the java compiler, I get an error :
C:\Users\denis.beurive>javac
Erreur : impossible de trouver ou charger la classe principale com.sun.tools.javac.Main
C:\Users\denis.beurive>javac -help
Erreur : impossible de trouver ou charger la classe principale com.sun.tools.javac.Main
I am stuck. I found many posts about "com.sun.tools.javac.Main" not found. However, I think that it does not apply to my specific situation, since the compiler crashes even without compiling anything.
Any Idea ?
PS: The JRE works fine (Tomcat runs...)
Note : there is no "pack" file in the directory "lib":
C:\Users\denis.beurive>dir C:\Progra~1\Java\jdk1.8.0_111\lib
 Le volume dans le lecteur C n'a pas de nom.
 Le numéro de série du volume est 3C7D-8A4C
 Répertoire de C:\Progra~1\Java\jdk1.8.0_111\lib
20/09/2018  08:30    <REP>          .
20/09/2018  08:30    <REP>          ..
19/10/2016  13:41         1 895 938 ant-javafx.jar
19/10/2016  13:41        17 403 201 ct.sym
19/10/2016  13:41           163 047 dt.jar
19/10/2016  13:41            18 432 ir.idl
19/10/2016  13:41            36 038 javafx-mx.jar
19/10/2016  13:41             1 682 jawt.lib
19/10/2016  13:41           407 728 jconsole.jar
19/10/2016  13:41           741 084 jvm.lib
19/10/2016  13:41    <REP>          missioncontrol
19/10/2016  13:41               640 orb.idl
19/10/2016  13:41             4 646 packager.jar
19/10/2016  13:41         2 419 817 sa-jdi.jar
19/10/2016  13:41    <REP>          visualvm
              11 fichier(s)       23 092 253 octets
               4 Rép(s)  15 330 598 912 octets libres