Java version messaging to users is inconsistent between Windows and Linux 'refine' scripts #4930
Labels
Good First Issue
Indicates issues suitable for newcomers to design or coding, providing a gentle introduction.
help wanted
An issue that we would love anyone to help us with
java version compatibility
Making sure OpenRefine runs on as many Java versions as possible
Type: Bug
Issues related to software defects or unexpected behavior, which require resolution.
If a user has set their
%JAVA_HOME%
env variable on Windows but the%PATH%
variable has a different Java version for the runtime and is lower than the compiled class file version 55.0 (Java 11) then users will notice an error and failure during startup even though the Java version check was successful.To Reproduce
Steps to reproduce the behavior:
%JAVA_HOME%
to a path having Java 8 Update 333%PATH%
env variable set to Java 11 runtimerefine.bat
Current Results
Expected Behavior
Windows
Since we now really depend on
%JAVA_HOME%
when setting the CLASSPATH in therefine.bat
script for Windows, we should fully use %JAVA_HOME% for the Java version inspection and logging to support.log.We currently have good support for checking the Java versions we support and reporting errors in our
refine
script for Linux and should ideally incorporate thatcheckJavaMajorVersion()
functionality and adapt it into ourrefine.bat
script for Windows. That way we are consistent with our Java error messaging to users on both platforms.Linux
One of the additional things in the
refine
Linux script seems to be that we are not using the$JAVA_HOME
env variable during thecheckJavaMajorVersion()
either but instead always a$JAVA
variable. We should ideally always refer to and use$JAVA_HOME
as a best practice in our version checking and classpath setup for refine startup, no matter the OS, since that is standard practice and gives users the ability to control their own Java environment or symbolically link to a different one.Screenshots
Versions
Datasets
Additional context
The text was updated successfully, but these errors were encountered: