Checking for Java Version Support

Typically, you start the AutoUpgrade JAR file in the Oracle home from which you are upgrading. However, the Oracle home must contain Java 8.

The AutoUpgrade utility is a Java 8 release JAR file, which is available in Oracle Database Oracle homes in releases after Oracle Database 12c Release 1 ( On Oracle Database releases 12.2, 18 and 19, Java 8 is the default. The path to the Java version in the Oracle home is Oracle-home/jdk/bin/java, where Oracle-home is the Source database Oracle home (the earlier Oracle Database release that you are upgrading). For example:

$ORACLE_HOME/jdk/bin/java -version

The result should be a Java 8 version. For example:

$ORACLE_HOME/jdk/bin/java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)

A successful response to autoupgrade.jar -version should be similar to the following:

java -jar ./build/production/autoupgrade.jar -version
build.hash 2ce58db
build.version 19.7.4 2020/01/17 10:54:33
build.max_target_version 19
build.type production

If your you attempt to start AutoUpgrade with a Java release earlier than Java 8. then the following error occurs:

$ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar -version
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at ...