-
Notifications
You must be signed in to change notification settings - Fork 25
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
JDK lookup breaks after homebrew openjdk change #66
Comments
Using the
|
I think we should update the function @reitermarkus Does Apple recommend tools to make use of |
Wait, by default
So JDK should have been searched: appbundler/appbundler/native/main.m Lines 740 to 752 in 9811366
And |
For the formula it is irrelevant what Apple recommends regarding |
If you create the |
Found more by reading the source. It is already using appbundler/appbundler/native/main.m Lines 890 to 892 in 9811366
In addition, Java version is decided by folder name (like |
You can run e.g. |
I'm the one who a few years ago submitted some of the changes to IK's appbundler for treating jrepreferred vs jdkpreferred, and also trying to parse the JDK version. And yes, it needs to be cleaned up, whether due to Oracle's change in Java numbering but more likely due to the way the numerous alternative Javas name their folders. As @FranklinYu notes, trying to parse the Java version based on folder name has become progressively more difficult. So as @reitermarkus suggests, it seems that calling |
Homebrew recently added an openjdk recipe, which is installed automatically as a dependency of Java-based command-line utilities like ant and maven. Specifically, the new homebrew recipe installs OpenJDK 13 from openjdk.net and symlinks this version to
/Library/Java/JavaVirtualMachines/openjdk.jdk
.This change causes appbundler-based apps to fail to discover the JDK, and raise the dreaded error:
I believe this issue is caused by the absence of a version number in the JDK's filename in
/Library/Java/JavaVirtualMachines/openjdk.jdk
. Appbundler expects to find a version number in the JDK's filename, e.g.,jdk-12.0.1.jdk
orzulu-8.jdk
; see https://github.com/TheInfiniteKind/appbundler/blob/master/appbundler/native/main.m#L837-L938.Renaming the homebrew JDK symlinked filename to
openjdk-13.0.2.jdk
fixes the issue, but ideally we could adjust appbundler to recognizeopenjdk.jdk
as a valid JDK.To reproduce, run
brew install openjdk
,brew cask install exist-db
, and then start /Applications/eXist-db.app. If eXist starts, be sure no other symlinked JDKs are in/Library/Java/JavaVirtualMachines
. (I'm even able to reproduce the error withzulu-8.jdk
present, so it seems appbundler's code really trips up onopenjdk.jdk
when it tries to parse it.)// cc: @reitermarkus
The text was updated successfully, but these errors were encountered: