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

Fixed handling jdk-* and jre-* Java installation paths #105

Merged
merged 1 commit into from
Jun 28, 2016

Conversation

artnowo
Copy link

@artnowo artnowo commented Jun 28, 2016

Without this change having paths starting with jdk- or jre- but without -openjdk nor -oracle at the end used to return version number like -1.7.0 which resulted in the following exception:

CAPSULE EXCEPTION: Could not parse version: -1.7.0 while processing system property java.home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91.x86_64/jre
java.lang.IllegalArgumentException: Could not parse version: -1.7.0
       at Capsule.parseJavaVersion(Capsule.java:4241)
       at Capsule.getJavaHomes(Capsule.java:4067)
       at Capsule.getJavaHomes(Capsule.java:4032)
       at Capsule.findJavaHome(Capsule.java:2579)
       at Capsule.chooseJavaHome0(Capsule.java:2560)
       at Capsule.chooseJavaHome(Capsule.java:2548)
       at Capsule.getJavaHome(Capsule.java:2532)
       at Capsule.getJavaExecutable0(Capsule.java:2258)
       at Capsule.getJavaExecutable(Capsule.java:2250)
       at Capsule.buildJavaProcess(Capsule.java:2208)
       at Capsule.buildProcess0(Capsule.java:1524)
       at Capsule.buildProcess(Capsule.java:1515)
       at Capsule.prelaunch0(Capsule.java:1488)
       at Capsule.prelaunch(Capsule.java:1481)
       at Capsule.prepareForLaunch(Capsule.java:1334)
       at Capsule.launch(Capsule.java:1263)
       at Capsule.main0(Capsule.java:394)
       at Capsule.main(Capsule.java:374)

Workaround for this error at the moment is to explicitly set desired JDK installation path with the use of -Dcapsule.java.home.

@coveralls
Copy link

coveralls commented Jun 28, 2016

Coverage Status

Coverage increased (+0.02%) to 59.576% when pulling a275eb3 on artnowo:master into e2b5048 on puniverse:master.

@pron pron merged commit 2b9a20c into puniverse:master Jun 28, 2016
@pron
Copy link
Contributor

pron commented Jun 28, 2016

Thank you!

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

Successfully merging this pull request may close these issues.

3 participants