
If you're experiencing this issue with Jenkins, see: Just install appropriate Java SE Development Kit library from the Oracle site or install Jenkins There is an OpenJDK 7 package in the FreeBSD Ports collection called openjdk7 which probably needs to be reconfigured. If you want to develop Java programs then install the java-1.7.0-openjdk-devel package. The java-1.7.0-openjdk package contains just the Java Runtime Environment. Install/upgrade appropriate package via: yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel Then you can install, for example: apt-get install openjdk-7-jre Or check which are available for install: apt-cache search ^openjdk To change it, use: update-alternatives -config java To check which java (openjdk) you've installed, check via: dpkg -l "openjdk*" | grep ^i To find where SDK Java folder is located, run the following commands: jrunscript -e '.println(("")) ' The most common issue is misconfiguration of your JAVA_HOME variable which should point to the right Java Development Kit library, if you've multiple installed. More information about this error is available in a blog post New javac warning for setting an older source without bootclasspath. With newer versions of the Java compiler you are likely to get a warning about the bootstrap class path not being set. To fix the actual problem you should try to either run the Java code with a newer version of Java JRE or specify the target parameter to the Java compiler to instruct the compiler to create code compatible with earlier Java versions.įor example, in order to generate class files compatible with Java 1.4, use the following command line: javac -target 1.4 HelloWorld.java The reported major numbers are: Java SE 20 = 64, The version number shown describes the version of the JRE the class file is compatible with.
