Skip to content

Better message when using wrong Java version #9215

@pedroigor

Description

@pedroigor

When running bin/kc.sh with Java 8, I see error message with long stacktrace like this:

Exception in thread "main" java.lang.UnsupportedClassVersionError: io/quarkus/bootstrap/runner/QuarkusEntryPoint has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        ...

This is fine for most of java developers, but someone not familiar with Java might be a bit lost with such message and will need to google to figure what's going on. Maybe it is better to use something more user-friendly like simple message: "Your Java version is too old. Please use Java 11 or newer. See command 'java -version' to figure what is your Java version".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions