-
Notifications
You must be signed in to change notification settings - Fork 56
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" #50
Comments
As far as I know it's down to stub support. You could fork an extant stub to support detecting / executing your bundled jvm. |
Yea, it's all in the stub. I simply substituted "universalJavaApplicationStub" |
If it’s a recent Java version, have you tried It’s like JavaFX |
jpackage sounds like the long term solution, but for now I can't even find a place to download it. |
It's part of JDK 14+. |
I finally found it - it's well concealed on macs. |
It's not concealed. It's where it should be expected. The bin folder of the jdk. If your $PATH is set correctly, it's just a matter of invoking it by name. |
The expected name is "jpackager" which is nowhere to be found on Macs. It's there on PCs. |
As I said, the name is jpackage. |
After much screwing around with jpackage, I think I've got it to work. There are residual |
Does anyone know if there is an option in jpackage that mimics the -o option in jar2app? The one that allows the app to use the macos menu bar... |
Add |
I had a similar issue and I fixed this by replacing the JavaAppLauncher of jar2app. You can get the working JavaAppLauncher from here https://github.com/tofi86/universalJavaApplicationStub Go to that link and you will see UniversalJavaStub inside the src folder. Take that file and rename it to JavaAppLauncher and use it to replace the old one that the jar2app has. |
Directly replacing JavaAppLauncher with universalApplicationStub fixes some problems, but because universalApplicationStub is a shell script, it can't be signed and can never get into the app store. If it were rewritten as a native binary, or if someone wrote a csh variant that took arguments from info.plist, that could be fixed. However, using jpackage is a more enduring solution - it will get support from oracle to keep it running despite apple. |
You realize they've quite literally said they've tried this already, right? Update or not it's not an acceptable solution. |
Sorry, I didn't read the whole thing and jumped right into the commenting. It seems this whole repo is dead and the owner hasn't done anything for a long time. I did learn new things. For me, I was only trying to make a jar executable program into an app just for casual usability for myself and not to upload it on AppStore. Also, thanks for sharing the solution :) |
I've jumped through most of the hoops to get my app into the apple app store; it works
fine if java is installed and jar2app doesn't specify a jvm. However, it seems unlikely that
apple will accept this. If I add a jvm with the -j, the .app no longer launches with the
quoted.
"unable to load java runtime environment"
I see traffic in other threads about the same problem, but no clear solutions.
The text was updated successfully, but these errors were encountered: