Comments (12)
What's your OS? How did you install the JVM?
from capsule.
The method Capsule#parseJavaVersion()
relies on this regex:
private static final Pattern PAT_JAVA_VERSION = Pattern.compile("(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(_(?<update>\\d+))?(-(?<pre>[^-]+))?(-(?<build>.+))?");
This regex fails when given a version of "1.8".
from capsule.
OS is "Ubuntu 14.04.1 LTS" & here are the relevant steps in the playbook to configure & install the JDK:
- name: add oracle jdk repository
apt_repository: repo=ppa:webupd8team/java
- name: accept jdk license terms
shell: echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
- name: set java_home
lineinfile: dest=/etc/environment state=present regexp='^JAVA_HOME' line='JAVA_HOME={{ java_home }}'
- name: install ubuntu packages
apt: pkg={{ item }} state=installed
with_items:
- oracle-java8-installer
from capsule.
I think the issue of parsing "1.8"
is unrelated.
from capsule.
I was using the sourceCompatibility
field in the Gradle script for the project to set Min-Java-Version:
field in the manifest. Even if I set sourceCompatibility
to be "1.8.0", Gradle rounded that down to "1.8".
from capsule.
See #58 (just fixed) for the "1.8" issue.
from capsule.
The parsing of the version is the deeper issue that ultimately caused the NPE.
A more insidious issue is that isMatchingJavaVersion()
is swallowing the IllegalArgumentException
thrown by parseJavaVersion()
, thus masking the real problem and leading to an NPE downstream.
from capsule.
Alright, this has been fixed.
You can either wait for Capsule 1.0 to be released in a few short weeks, copy the fix to your clone of 0.10.0, or change the name of your JVM directory.
from capsule.
Well all I needed to do was change it to use "1.8.0" as the version number, the name of the JDK home directory is a red herring.
You should change the code to not swallow the IllegalArgumentException being caught here.
from capsule.
Well, the Java home dir wasn't being recognized either, so those were two actual bugs.
from capsule.
Your call, but I'm not so sure that's the case. I didn't change the directory in JAVA_HOME
-- only changed Min-Java-Version
to be "1.8.0" and it worked.
Maybe I'm just getting lost in the code but if it's not recognizing the Java home dir, how did it get the version string "1.8.0_31" (see above error message)?
from capsule.
how did it get the version string "1.8.0_31"
Because that JVM happened to be the one used to launch the capsule itself, so it got the version number from the java.version
property.
from capsule.
Related Issues (20)
- Guide for obfuscating with Allatori or ProGuard with Gradle? HOT 1
- Capsule depends on JDK internal APIs that have been removed from JDK9 HOT 2
- Can't restrict away from Java 9 using javaVersion manifest value HOT 6
- Repeated JVM command line options are not preserved
- hyphenated paths cause errors (probably java.nio path parsing...)
- Add classpath with system property
- [JDK9] Illegal reflective access warning HOT 3
- Override Args
- Capsule cache should support multiple versions of an application/CAPSULE_ID
- Could not determine artifacts for us.kirchmeier.capsule
- website http://capsule.io/ is down HOT 1
- how about a new release?
- PAT_JAVA_VERSION_LINE fails to recognize Zulu openjdk 10.0.2
- Version string produced by Java 10 and later is not recognised
- Capsule hangs when try to lock app directory
- Using Capsule with Spark yields ConcurrentModificationException on terminating the application HOT 1
- Some potential NullPointerException bugs HOT 1
- Capsule docs web site is gone HOT 4
- CAPSULE EXCEPTION: Could not parse version: 11.0.9.1 while processing attribute Min-Update-Version: {} HOT 2
- Fails to find version when JAVA_TOOL_OPTIONS is set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capsule.