OPSWEB http REST App - ClientWebUtil.java:60: error: cannot find symbol import java.util.Base64;
search cancel

OPSWEB http REST App - ClientWebUtil.java:60: error: cannot find symbol import java.util.Base64;

book

Article ID: 250576

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

When executing Buildapp.bat we got the next error messages:

C:\OPS\OPSWebSvcApp>buildapp.bat
Using "C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe" found in JAVA_HOME
Found Java compiler at "C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe"
      Java jar executable at "C:\Program Files\Java\jdk1.7.0_80\bin\jar.exe"
Compiling src\com\ca\automation\opsmvs\websvc\msgdata
  "C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe" -g -d classes -cp "lib\*;classes" src\com\ca\automation\opsmvs\websvc\msgdata\*.java
Compiled src\com\ca\automation\opsmvs\websvc\msgdata rc=0
Compiling src\com\ca\automation\opsmvs\apps\webclient
  "C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe" -g -d classes -cp "lib\*;classes" src\com\ca\automation\opsmvs\apps\webclient\*.java
src\com\ca\automation\opsmvs\apps\webclient\ClientWebUtil.java:60: error: cannot find symbol
import java.util.Base64;
                ^
  symbol:   class Base64
  location: package java.util
warning: lib\jackson-databind-2.13.2.2.jar(com/fasterxml/jackson/databind/ObjectMapper.class): major version 52 is newer than 51, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
warning: lib\jackson-databind-2.13.2.2.jar(com/fasterxml/jackson/databind/SerializationConfig.class): major version 52 is newer than 51, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
src\com\ca\automation\opsmvs\apps\webclient\ClientWebUtil.java:267: error: cannot find symbol
      String auth= new String( Base64.getEncoder().encode(b) ,Charset.forName("UTF-8") );
                               ^
  symbol:   variable Base64
  location: class ClientWebUtil
src\com\ca\automation\opsmvs\apps\webclient\ClientWebUtil.java:582: error: cannot find symbol
      String auth= new String( Base64.getEncoder().encode(b) ,Charset.forName("UTF-8") );
                               ^
  symbol:   variable Base64
  location: class ClientWebUtil
warning: lib\jackson-databind-2.13.2.2.jar(com/fasterxml/jackson/databind/DatabindException.class): major version 52 is newer than 51, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
warning: lib\jackson-databind-2.13.2.2.jar(com/fasterxml/jackson/databind/JsonMappingException.class): major version 52 is newer than 51, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
warning: lib\jackson-databind-2.13.2.2.jar(com/fasterxml/jackson/databind/JavaType.class): major version 52 is newer than 51, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
warning: lib\jackson-databind-2.13.2.2.jar(com/fasterxml/jackson/databind/ObjectWriter.class): major version 52 is newer than 51, the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
3 errors
6 warnings
Failed to compile path src\com\ca\automation\opsmvs\apps\webclient; rc=1
Press any key to continue . . .

 

 

 

 

Environment

Release : 13.5 14.0

Component : OPS/MVS

Cause

Using an older JDK than the minimum version 8.

Resolution

You need a newer JDK to build this application. The minimum level is jdk1.8.n_nnn

Application is successfully built with the version below:

jdk1.8.0_333