Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandLineMain has been compiled by a more recent version of the Java Runtime #35

Closed
jedenastka opened this issue Mar 9, 2020 · 1 comment

Comments

@jedenastka
Copy link

jedenastka commented Mar 9, 2020

Environment info

  • BlockMap version: 1.6.1
  • Java version:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Debian-2)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Debian-2, mixed mode, sharing)
  • Operating system:
Linux pecet 5.4.0-4-amd64 #1 SMP Debian 5.4.19-1 (2020-02-13) x86_64 GNU/Linux

Description

I can't run this program on Debian Sid.

Steps to reproduce

  1. Install Debian Sid
  2. Install openjdk-11-jre
  3. Download the CLI version
  4. Run it via java -jar $THE_JAR

Actual result

~/Pobrane $ java -jar BlockMap-cli-1.6.1.jar
Error: LinkageError occurred while loading main class de.piegames.blockmap.standalone.CommandLineMain
        java.lang.UnsupportedClassVersionError: de/piegames/blockmap/standalone/CommandLineMain has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 55.0
~/Pobrane $

Expected result:

I don't know, I never used the program. But it should show me a help message, I think.

Debug log

Seems to not change anything. I probably shouldn't except anything, cause it's Java error...

~/Pobrane $ java -jar BlockMap-cli-1.6.1.jar -v                                    
Error: LinkageError occurred while loading main class de.piegames.blockmap.standalone.CommandLineMain
        java.lang.UnsupportedClassVersionError: de/piegames/blockmap/standalone/CommandLineMain has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 55.0
~/Pobrane $ 

EDIT: I also tried to compile it. gradlew gave me error saying that the project is incompatible with latest version.

~/BlockMap $ ./gradlew regenerate
Downloading https://services.gradle.org/distributions/gradle-6.0.1-bin.zip
.........10%.........20%.........30%.........40%.........50%.........60%.........70%.........80%.........90%.........100%

Welcome to Gradle 6.0.1!

Here are the highlights of this release:
 - Substantial improvements in dependency management, including
   - Publishing Gradle Module Metadata in addition to pom.xml
   - Advanced control of transitive versions
   - Support for optional features and dependencies
   - Rules to tweak published metadata
 - Support for Java 13
 - Faster incremental Java and Groovy compilation
 - New Zinc compiler for Scala
 - VS2019 support
 - Support for Gradle Enterprise plugin 3.0

For more details see https://docs.gradle.org/6.0.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :BlockMap:BlockMap-core:compileJava FAILED
> Task :regenerate FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':BlockMap:BlockMap-core:compileJava'.
> Could not target platform: 'Java SE 12' using tool chain: 'JDK 11 (11)'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2m 0s
1 actionable task: 1 executed
~/BlockMap $

EDIT 2: The same happens on Debian 10.
EDIT 3: Sorry, just noticed that I need Java 12 :/ Closing for now.

@piegamesde
Copy link
Owner

Yeah, I've done that mistake confusing Java 11 and 12 more than once :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants