11g JVM using JDK 1.5 Cannot compile Typesafe enumorator (Doc ID 738229.1)

Last updated on MARCH 01, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7 - Release: 11.1 to 11.1
Information in this document applies to any platform.

Symptoms

When creating an enum (as a new feature in 11g 1.5 jdk), it fails during parsing from sqlplus:
.
SQL> create or replace and compile java source named Color as public enum
Color
2 { RED, GREEN, BLUE; }
3 /
.
Warning: Java created with compilation errors.
.
SQL> show error
Errors for JAVA SOURCE "COLOR":
.
LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 COLOR:1: error while writing Color: destination for Color
0/0 1 error
0/0 ^
0/0 public enum Color

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms