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

If the JVM version is too low, show a simple, clean error message #963

Closed
ge0ffrey opened this issue Jul 2, 2024 · 1 comment · Fixed by #1037
Closed

If the JVM version is too low, show a simple, clean error message #963

ge0ffrey opened this issue Jul 2, 2024 · 1 comment · Fixed by #1037
Assignees
Labels
bug Something isn't working process/needs triage Requires initial assessment of validity, priority etc. python Is related to Python code.
Milestone

Comments

@ge0ffrey
Copy link
Contributor

ge0ffrey commented Jul 2, 2024

To reproduce:

sdk java use 11.2.3-tem (or whatever is the latest today)
cd school-timetabling
mvn quarkus:dev

Result:

File "org.jpype.pkg.JPypePackage.java", line -1, in org.jpype.pkg.JPypePackage.getObject
Exception: Java Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "org.jpype.pkg.JPypePackage.java", line -1, in org.jpype.pkg.JPypePackage.getObject
java.lang.java.lang.UnsupportedClassVersionError: java.lang.UnsupportedClassVersionError: ai/timefold/jpyinterpreter/CPythonBackedPythonInterpreter has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
... man more lines

Desired, something like (feel free to adjust):

Timefold Solver for Python requires JVM (java) version 17 or later. Your JVM version (11.2.3) is not supported.
Maybe use sdkman (https://sdkman.io) to install a more modern version of Java.
@ge0ffrey ge0ffrey added bug Something isn't working process/needs triage Requires initial assessment of validity, priority etc. labels Jul 2, 2024
@ge0ffrey
Copy link
Contributor Author

ge0ffrey commented Jul 2, 2024

Similarly, if no java is installed at all, it should output something like:

Timefold Solver for Python requires JVM (java) version 17 or later. You have none installed.
Maybe use sdkman (https://sdkman.io) to install a modern version of Java.

@triceo triceo transferred this issue from TimefoldAI/timefold-solver-python Jul 17, 2024
@triceo triceo added java Is related to Java code. python Is related to Python code. and removed java Is related to Java code. labels Jul 17, 2024
@triceo triceo linked a pull request Aug 13, 2024 that will close this issue
@triceo triceo added this to the v1.14.0 milestone Aug 13, 2024
@zepfred zepfred linked a pull request Aug 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working process/needs triage Requires initial assessment of validity, priority etc. python Is related to Python code.
Projects
None yet
4 participants