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

Support for Java 17? #85

Open
dionisi opened this issue Nov 28, 2022 · 2 comments
Open

Support for Java 17? #85

dionisi opened this issue Nov 28, 2022 · 2 comments

Comments

@dionisi
Copy link

dionisi commented Nov 28, 2022

Does the appbundler has support for Java 17?
Now, when I try to bundle app with Java 17, startup of the application fails with JRE Load Error.
Output of the command 'Contents/MacOS/JavaAppLauncher' is:

Error launching JVM Runtime (zulu-17.jre) Relative Path: '/Volumes/****/Contents/PlugIns/zulu-17.jre' (dylib: (null))
  error: JRELoadError

When I compared the folder structure for Java 11 and Java 17, it seems there is (again) a change in the structure:

 MacOS % find /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home -name "libjli.dylib"
/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/lib/jli/libjli.dylib
 MacOS % find /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home -name "libjli.dylib"
/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/lib/libjli.dylib

More specific, the directory jli has been removed

@colorizenl
Copy link

@dionisi We have something in the Mac App Store that uses both Java 17 and AppBundler. However, we use Adoptium, not Zulu. Maybe that has something to do with it?

@sreilly
Copy link
Contributor

sreilly commented Dec 18, 2022

I also use adoptium, but I'd think zulu should also work.

We do also have to do some things in order to make sure it works. For example, in our build script we make sure to do the following:

  1. Set the JVM plugin to a folder with the format XXX.jdk. MacOS needs to have an extension on that folder, though not necessarily .jdk. I wonder if macOS is also picky about other parts of the path, and maybe doesn't like the -11 part of the plugin folder? In our case we use the path Moneydance.app/Contents/Plugins/vm.jdk
  2. Under the jvm path we remove the Contents/MacOS/libjli.dylib file which is redundant anyway since it is also at Contents/Home/lib/libjli.dylib (at least on adoptium).

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

No branches or pull requests

3 participants