Article From:



Because of the cause of the work, the JDK1.8 version used before, because the online production environment is JDK1.6, remember that the last time it was because it was not clear about the JDK version of the online environment, the 1.8 version of its compilation was published to the online environment, leading to the startup of java.lang UNSupported classversion

After this online problem, I need to install JDK1.6 version locally, but there will be some problems in installing the configuration environment variables.
For example
Here's a picture description.<br />Let’s talk about how to avoid these problems and configure them correctly.</p><h2 id= environment”

jdk1.6 ,jdk1.8

install JDK

Two ways

  1. Download the green version on the Internet and put it in the directory of a disk, such as D:\jdk1.6.
  2. The official website downloads the EXE document, the channel is quite many, after downloading, clicks the EXE document, has been thinking about next step, until the installation has finished.

I chose to install the version of JDK, 1.6 and 1.8 installed under the same path:
Here is a picture description ” >
There should be nothing to say about installing this piece. Generally there are few problems.



Environment variable configuration

Since JDK1.8 has been installed before, when JDK1.6 is installed,

Step one: modify JAVA_HOME to 1.6 installation path C:\Program Files\Java\jdk1.6.0_43

Second step: modify the registry

Here is a picture description ” >

Before this value is 1.8, manual change to 1.6

The third step: java.exe, javaw.exe, javaws.exe files generate directory by default.

a)jdk1.6、jdk1.7These three files will be generated under the C:\Windows\System32 directory.
b)jdk1.8These three files will be generated under the C:\ProgramData\Oracle\Java\javapath directory.

Find these files under the directory of JDK1.8, then copy the files below bin under the JDK1.6 installation directory to C:\Windows\System32.
Here is a picture description ” >



Enter Java – version again
Here is a picture description ” >

jdkThe handover is successful.

At this point, you can switch the JDK version of Eclipse or other development tools to JDK1.6.

Here is a picture description ” >

At this point, you can compile and compile with Eclipse in JDK1.6.

Leave a Reply

Your email address will not be published. Required fields are marked *