Comments (6)
Which is the JVM used to launch the capsule (when you type java
)? Is it perhaps C:\Program Files (x86)\Java\jre7
?
from capsule.
Incidentally, yes
$ java -version
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode, sharing)
Although setting the correct JAVA_HOME
would solve issue the I was under the impression that the JDK-Required
property would override that.
from capsule.
Well, it should work even if you set your JAVA_HOME
to C:\Program Files\Java\jre7
.
The thing is that Capsule's Java installation detection is limited. It can't search the whole filesystem, or it would take too long. Instead, it uses a heuristic: it already knows of one Java installation -- the one used to launch the capsule itself -- so it looks for other installations in the same directory. On your machine, you have Java installations in two different directories: C:\Program Files (x86)\Java\
and C:\Program Files\Java\
. If you launch the capsule using an installation in one directory, it won't find installations in the other.
Perhaps it's worth adding a special case for Windows's C:\Program Files (x86)\
/C:\Program Files\
from capsule.
I think that would be a great idea and should resolve probably the most common reason for this problem. Also it's still a bit odd that -Dcapsule.jvms
didn't even print the JVM it was run with. Thanks for the quick response :)
from capsule.
Yes, that is strange. I will look into that. Can you confirm that Capsule behaves properly (i.e. respects JDK-Required
) when JAVA_HOME
is C:\Program Files\Java\jre7
?
from capsule.
So two things going on here. The java binary run was apparently run from c:/windows/system32
, no wonder no java installation was detected ..
Secondly
$ c:/Program\ Files/Java/jre7/bin/java -Dcapsule.jvms -jar foo.jar
CAPSULE: Detected Java installations:
1.7.0_45 c:\Program Files\Java\jdk1.7.0_45\jre
1.7.0_09 c:\Program Files\Java\jdk1.7.0_09\jre
CAPSULE: selected null
Starting the application with the above command, with the JDK-Required
flag, doesn't seem to work either. The following two variants however does
$ java -jar -Dcapsule.java.home="c:/Program\ Files/Java/jdk1.7.0_45/" -jar foo.jar
$ "c:/Program Files/Java/jdk1.7.0_45/bin/java" -jar foo.jar
For reference, JAVA_HOME
set to c:/Program Files/Java/jdk1.7.0_45/
.
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.