Methods of easily debugging/fixing the scripts with known facts - Part2



Version mismatch of Installed Java, compiled Java project and Eclipse IDE. I have listed issues by high priority
1)       Eclipse - 32 bit , Java 8 64 bit
2)       Eclipse - 32 bit, Java 7 32 bit but the project is mapped to Java 6 path
3)       Wrongly pointed out of the Java bin path in the Path environment variable led to not able to open Eclipse IDE. If we try to open, it will throw exit code 13.
4)       java.lang.UnsupportedClassVersionError or Unsupported major.minor version 52.0

Happens because of using Higher JDK during compile time and lower JDK during runtime.
               
                The issue 1 and 4 can be fixed by upgrading/degrading of either Eclipse or Java.The reported number in the error message is the requirednumber, not the number we are using. The reported major numbers with the required versions are,
                                Java SE 9 = 53,
                                Java SE 8 = 52,
                                Java SE 7 = 51,
                                Java SE 6.0 = 50,
                                Java SE 5.0 = 49,
                                JDK 1.4 = 48,
                                JDK 1.3 = 47,
                                JDK 1.2 = 46,
                                JDK 1.1 = 45


                The other issues 2 and 3 can be fixed by updating the eclipse.ini file which can be found in the Eclipse base folder.

                --launcher.appendVmargs
                -vm
                C:\Program Files\Java\jre1.x.0_x\bin\javaw.exe
                -vmargs

                Note:  a) The -vm parameter should be added before -vmargs with the full path to the javaw.exe in a separate line.
                            b) Do not enclose the path in double quotes (").

                Or

                Removing the unwanted file path in PATH system environment variable and updating the correct Java bin path will resolve this issue.
                               
                Note: a) if we are working on VDI or Terminal server machine then it would be difficult to access the environment variable due to lack of permission.

                           b) We may not aware which one is unwanted file path

Popular posts from this blog

Selenium Webdriver Interview Questions with Answer

Selenium IDE Interview Questions with Answer

DLL to Jar file conversion