My Oracle Support Banner

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

Last updated on OCTOBER 24, 2019

Applies to:

Java SE JDK and JRE - Version 1.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

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.