Skip to Content

Why do I get a warning "major version 51 is newer than 50"?

Estimated Reading Time: 1 Minutes

After installing isCOBOL 2020R1 or earlier with JDK 7 you may get a compiler warning such as the following:


warning: javalangObject.class(javalang:Object.class): major version 51 is newer than 50, the highest major version supported by this compiler.
This happens when there is a tools.jar file from JDK 6 in CLASSPATH before the one from JDK 7.
For example, if you installed isCOBOL with JDK 6 and then installed it with JDK 7, your user CLASSPATH setting might be as follows:
C:\Program Files\Veryant\isCOBOL2012R1\lib\*; C:\Program Files\Java\jdk1.6.0_26\lib\tools.jar; C:\Program Files\Java\jdk1.7.0_03\lib\tools.jar
To fix this problem:
  1. Launch the control panel
  2. Edit the system environment variables (e.g. In Windows 7 search for "environment variables" or go to "System and Security > System > Advanced system settings" and click on Environment Variables)
  3. Double-click on CLASSPATH and delete the path to the JDK 6 version of tools.jar in both "User variables" and "System variables
NOTE:
The tools.jar does not need to be in the classpath in version 2020 R2 and above, so you should not get the message in these versions.

Why do I get a warning "major version 51 is newer than 50"?

Powered by PHPKB (Knowledge Base Software)