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 (12.1.0.2). 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@sales]$ $ORACLE_HOME/jdk/bin/java -version
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

When you upgrade Oracle Database 11g Release 2 (11.2.0.4) or earlier releases, you can use AutoUpgrade. However, because Java 8 is not available in the Oracle Database Oracle homes for Oracle Database 11g Release 2 and earlier releases, you must start AutoUpgrade from the Java release in the Target Oracle home (the Oracle home to which you are upgrading), or install Java 8 in your Source Oracle home.

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

[oracle@sales ~]$ $ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar -version
build.version 20190201
build.date 2019/02/01 11:50:22
build.label RDBMS_PT.AUTOUPGRADE_LINUX.X64_190131.1800

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 ...