4 Ответы Последний ответ: 12.05.2020 20:42, автор: Mike301

    SQLcl 19.4 - "java.lang.UnsupportedClassVersionError Bad Version number in .class file"

    Mike301

      SQLcl - 19.4

      DB: 12c / 18c

      Client folder - 11g

       

      I'm able to unzip and connect perfectly fine when I have sqlcl folder outside Oracle Client folder but as soon as I place sqlcl folder inside 11g Oracle client it give me java error.

       

      Error:  "java.lang.UnsupportedClassVersionError Bad Version number in .class file"

       

      How can I have SQLcl get it working place installation folder inside Oracle Client?

      Somehow I have a feeling Oracle client is messing JAVA_HOME or some environment.

       

      Case-1: Works:

      1. SQLcl outside Oracle client location

      2. unset ORACLE_HOME

      3. set JAVA_HOME=jdk1.8

      4. Invoke sqlcl

       

      Case-2: Doesn't  work: (java error)

      1. SQLcl inside Oracle client location

      2. unset ORACLE_HOME

      3. set JAVA_HOME=jdk1.8

      4. Invoke sqlcl

       

      Case-3: Doesn't work: (java error)

      1. SQLcl inside Oracle client location

      2. unset ORACLE_HOME

      3. set JAVA_HOME=jdk1.8

      4. Comment out below entries in checkADE

      5. Invoke sqlcl

       

      # if we are in ADE environment, check for JAVA_HOME

      #

      function checkADE {

              #

              # Resolve java path for development builds

              #

             if  [  "m$ORACLE_HOME" != "m" ]; then

      #        if  [ -d "$ORACLE_HOME/jdk/jre" ]; then

      #            JAVA_HOME="$ORACLE_HOME/jdk/jre"

      #            PATH="$JAVA_HOME/bin:$PATH"

      #        fi

               export SQLPLUS_CLASSIC=true

             fi

      }