Sunday 15 September 2013

windows - Change JDK to another version issue -


I have started on a project which specifically says that use 1.6 JDK to stop the form When I try, change JDK from 1.7 to 1.6.

Although I changed the environment variable from 1.7 to 1.6 JDK version, when I entered java.exe -version or java -version in CMD , it still returns the first version but when I run the javac -version , it gives version 1.6.

I have done so far,

In the user environment variable,

  • set the path to c: \ program files \ java \ jdk1 .6.0_43 (JDK installation path)
  • Added path to java_home variable and c: \ program files \ java \ jdk1.6.0_43 (JDK installation path )
  • Change the path of C: \ Program Files \ Java \ jdk1.6.0_43 \ bin (Java Bin)

    System environment variables In,

    • Added C: \ Program Files \ Java \ jdk1.6.0_43 \ Bin to CLASSPATH
    • Created JAVA_HOME variable and added C: \ program files \ java \ jdk1.6.0_43 \ bin

      There is a variable that is related to Java, which is called QLJAVA and Path C: \ Program Files (x86) \ Java \ jre7 \ lib \ ext \ QTJava .zip was set to and I also removed that variable. ago I edited CLASSPATH This is the same path that was there

      My problems ,

      1. Why is 1.7 selected when using Java-version, and why do different results when running javac -version ? Or is there something wrong with what I've already done?
      2. QLJAVA variables and how it is used and how the system variable is finished.

      3. Why there is no backup compatibility to convert to 1.6.

        Java AVIIM should point to the Java installation path / path in the % JAVA_HOME% / bin

        I usually set different Java versions as separate environment variables and JAVA_HOME < / Code>

        For example

          JAVA_6 = c: \ jdk6 JAVA_7 = c: \ jdk7 JAVA_HOME =% JAVA_6% (or JAVA_HOME =% JAVA_7%) path = Besides, some other entries in the path can point to any other version of Java, so I usually call % JAVA_ HOME% \ bin  connects the entry for the first time.  

        In addition, when you change the environment variable, you have to close and open a new CMD charge to reload the environment variable.

        Finally, having an empty space on your way can have an effect. You may need to add quotation for them or use the old convertible conference in DOS. like. Program ~ 1 instead of program files

        to respond to your issues.

        1. Set your path environment variable digits and password only for the different paths for Java as the first entry in the PATH variable % JAVA_HOME% \ bin And it should choose the correct version of Java.

        2. For QTJAVA, I have not been able to do so so I can not give a solid answer. How did he get there, okay, while installing some software / programs, then they got there that way to modify the environment variables

        3. It should be backward compatible or try to do it. I have not seen the code nor have actually tried the JDK 7 quite late but given the link (given to you), according to this issue, it looks like a JDK 7 issue.

          Hope this helps.

No comments:

Post a Comment