javac exits with error "array type has too many dimensions" (Doc ID 1328782.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Java SE JDK and JRE - Version 5.0 and later
Java Platform, Standard Edition - Version 5.0 and later
Information in this document applies to any platform.

Symptoms

The Java language compiler 'javac' fails to compile Java source code
and exits with error message "array type has too many dimensions". Example:

TooManyDimensions.java:17: array type has too many dimensions
        tooManyDimensionsArray = new long
        ^
TooManyDimensions.java:17: array type has too many dimensions
        tooManyDimensionsArray = new long
                                 ^
2 errors

Changes

You have created new source code or changed source code.
For an example see TooManyDimensions.java

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