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

mmj2 bad version check; remove? #36

Open
cwitty opened this issue May 1, 2020 · 1 comment
Open

mmj2 bad version check; remove? #36

cwitty opened this issue May 1, 2020 · 1 comment

Comments

@cwitty
Copy link

cwitty commented May 1, 2020

When I tried to run mmj2, it failed with this error:

Exception in thread "main" java.lang.NumberFormatException: For input string: "14-ea"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
        at java.base/java.lang.Integer.parseInt(Integer.java:652)
        at java.base/java.lang.Integer.parseInt(Integer.java:770)
        at mmj.util.BatchMMJ2.checkVersion(BatchMMJ2.java:129)
        at mmj.util.BatchMMJ2.<init>(BatchMMJ2.java:40)
        at mmj.util.BatchMMJ2.main(BatchMMJ2.java:51)

It's complaining because it can't parse the version; sure enough:

$ java -version
openjdk version "14-ea" 2020-03-17
OpenJDK Runtime Environment (build 14-ea+36-Debian-2)
OpenJDK 64-Bit Server VM (build 14-ea+36-Debian-2, mixed mode, sharing)

my Java version seems to be "14-ea". (This is on a reasonably current Debian testing, using Debian's openjdk-14-jdk package version 14~36-2.)

Since the code is checking to make sure you have at least Java 1.5 (== J2SE 5.0), which was released over 15 years ago, maybe that function could just be deleted? If somebody hasn't upgraded their Java version in 15 years, I don't think mmj2 is going to be what pushes them to do it... (I simply commented out the entire body of checkVersion() and recompiled, which resulted in a working version.)

@david-a-wheeler
Copy link
Contributor

david-a-wheeler commented May 2, 2020

Can you please create a pull request that removes the version check?

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