Logisim icon indicating copy to clipboard operation
Logisim copied to clipboard

Handle OpenJDK 18 version number

Open johnterickson opened this issue 3 years ago • 0 comments

On Ubnutu 22.04 I have openJDK 18 installed and it has a version string that confuses the detection logic. It looks like all the comparisons were against the major version only, so I changed it to an int.

Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NumberFormatException: For input string: "18-ea"
        at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
        at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
        at java.base/java.lang.Double.parseDouble(Double.java:651)
        at com.cburch.logisim.Main.getVersion(Main.java:56)
        at com.cburch.logisim.Main.<clinit>(Main.java:47)
john@jerick-x1-2:~/lutcomp/logisim$ java --version
openjdk 18-ea 2022-03-22
OpenJDK Runtime Environment (build 18-ea+36-Ubuntu-1)
OpenJDK 64-Bit Server VM (build 18-ea+36-Ubuntu-1, mixed mode, sharing)

johnterickson avatar Jul 06 '22 01:07 johnterickson