-
Notifications
You must be signed in to change notification settings - Fork 278
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
Unable to load Java Runtime Environment #144
Comments
It might be a problem that the JREs were installed via HomeBrew. I am not sure, if macOS finds those when you click on the .app. I'll have to investigate a bit here... The layout and manifest file seem wrong, but actually are fine when you run KSE as an app bundle. Until I have figured out what happens here, you can either download the ZIP package, which includes a shell script (kse.sh) that also works under macOS or you could install a JRE from Oracle. |
Thanks Kai. Both of your suggestions worked. Obviously the latter is preferable as it allows use of the application in the normal way. It would still be good, if it didn't have to rely on a component installed by the Oracle installation, though. |
I have tried a newer version of the launcher software that is used to start KSE in the app bundle and it seems to find the Java runtime that was installed via Homebrew. I'll put it in the next release of KSE, but leave this ticket open in case it doesn't fully solve the problem. |
Same error with sdkman java with 5.4.1 version |
@neetkee The problem with sdkman is that it installs the Java runtime under |
Does the current version (5.4.1) work with JDK-11.0.1? I seem to have difficulties, like - it would pop the "Add Extensions" window, but when I actually add them, won't accept the "OK" button... To be more precise - loading from Template seems broken. Extensions in them are not editable. You click on the "pencil" button, and nothing happens. Those same extensions are successfully set when entered without Template. Templates in question were saved by KSE-5.2.1 (or even older), and used successfully with 5.2.1 (don't remember if I used them with later versions, until now). |
@mouse07410 There were inconsistencies in earlier versions of KSE in how extensions were internally stored, which caused some bugs. Those inconsistencies/bugs are fixed, but templates stored with older versions might be incompatible now. I'll look into it, but it's certainly not related to JDK11. Then there is a known (and fixed in git) bug that the "Use Standard Template" button does nothing, which is also unrelated to JDK11. |
I am seeing this on both Amazon Corretto 8 and also AzulSystems Zulu 8 (both certified versions of Java 8). I can see them using /usr/libexec/java_home -V Matching Java Virtual Machines (2): When I run Keystore Explorer from the command line by going into KeyStore Explorer.app/Contents/MacOS and running ./"KeyStore Explorer" I get this: 2019-02-05 19:42:05.279 KeyStore Explorer[38823:8385153] NSString *findJavaDylib(NSString , _Bool, _Bool, _Bool, _Bool) Searching for a JRE. I get this if one or the other or both of Amazon Corretto 8 or Zulu 8 are installed. |
I also tried AdoptOpenJDK jdk8u202-b08 (manually unzipped into /Library/Java/JavaVirtualMachines) Same exact error occurs. Interestingly AdoptOpenJDK jdk-11.0.2+9 works ok albeit with some warnings: 2019-02-05 20:02:50.498 KeyStore Explorer[41895:8401189] NSString *findJavaDylib(NSString *, _Bool, _Bool, _Bool, _Bool) Searching for a JRE. |
@kjjaeger I am aware of the problems with the alternative Java distributions and I am working on solutions. |
@kaikramer Good to know. I will stick with Oracle JDK 8 for a while longer. |
same here for OpenJDK 12
|
@childnode Please read my comments above. You can't run the jar file from the application bundle with KSE works fine with OpenJDK 12, it's just that the native launcher in the app bundle doesn't find the JRE. |
I am having the same problem still. Regardless of how I install java, the KSE launcher will not find the JRE. Java is installed: java -version Is there not any option that can be explicitly added to the plist file to point at the java install? |
Just a quick status update: A pull request for appbundler (the KSE launcher for macOS) that adds support for newer and alternative Java distributions is in testing: |
I have the same issue after DMG install, but starting kse via the kse.sh script worked for macOS! |
Just a recent observation: but these all fail: |
See the same issue on any java version. |
I have found a workaround for Azul Systems Zulu 8 and 11 on MacOS. Zulu 8 or 11 get installed into /Library/Java/JavaVirtualMachines as zulu-8.jdk or zulu-11.jdk. Rename the package to something with 'jdk' in the name BEFORE the extension, like zulujdk-8.jdk or zulujdk-11.jdk . Launching using the icon seems to work for me by doing this rename. This doesn't seem to work for Zulu 12 (and AdoptOpenJDK 12 fails as well). I believe the issue there is related to libjli.dylib being moved up a directory from JDK 12 onward. |
It looks like the issue has been addressed upstream in AppBundler for a couple months now. https://bitbucket.org/infinitekind/appbundler/pull-requests/55/extend-refactoring-to-iterate-over/diff Could a new 5.4.x release be made that includes the new fixed AppBundler? Thanks. |
Hi Kai, I have installed the JRE 12 from Oracle on my Mac. But I face the same issue. "Unable to load Java Runtime Environment". |
I was able to run it by using the .zip file with the kse.sh script on a Mac |
KSE 5.4.2 released |
my java both 1.8 and 1.11 are installed using sdkman. Cheers |
@mshahat See my comment above: #144 (comment) |
@mshahat we are using appbundler to find the Java runtime. If you want it to support sdkman then you can create an issue there. For example, I had issue opening it with Java from MacPorts, and I created TheInfiniteKind/appbundler#59. |
I did a test on my Mac with Catalina 10.15.3. I have Amazons Corretto JDK 11 and 8 installed. JAVA_HOME is set correctly and yet KSE 5.4.3 seems to be broken. It just can't find my Java runtime. I uninstalled 5.4.3 and re-installed 5.4.2 and this one works. |
Same thing for me on my mac. 5.4.2 works fine, 5.4.3 does not work. |
Under Catalina on my Mac 5.4.3 does not work |
Just a quick question - why not just use I just wanted to check one keystore with KSE 5.4.3 and got the same error. KSE from brew, OracleJDK8_u202, AdoptOpenJDK (build 11.0.8+10) EDIT: Bundle from the website works just fine so only brew version seems to be affected. |
@woj-tek How would you set There is a way to make environment variables available for GUI applications (see https://apple.stackexchange.com/a/106814/356482) but this is not for the average user. Furthermore the macOS launcher is a third party component, I cannot simply change how it works. I have considered writing my own launcher, but that wouldn't change the messy situation with different Java distributions and take more of my time dealing with OS specific problems instead of working on actual KSE features. |
The application (installed either via HomeBrew, or from a direct download/install of DMG) on macOS High Sierra won't start. It displays a dialog with the message "Unable to load Java Runtime Environment".
Running the
kse.jar
withjava -jar kse.jar
under/Applications/KeyStore Explorer.app/Contents/Java
results in:If I look at the
MANIFEST.MF
file, I see:Notice that the
Class-Path
specifies that the dependencies are in a subdirectorylib
, but this doesn't exist in theJava
folder:This same layout and error occurs if I try to build the application and appbundle from source.
As a workaround, I can create a symlink
ln -s . lib
in this directory and then the app starts when run withjava -jar kse.jar
, but it still doesn't work when the .app is double-clicked.Environment
The text was updated successfully, but these errors were encountered: