java-decompiler / jd-gui

A standalone Java Decompiler GUI
GNU General Public License v3.0
13.94k stars 2.38k forks source link

Fails to detect installed Oracle JDK #373

Open alexchandel opened 2 years ago

alexchandel commented 2 years ago

Running JD-GUI on macOS 11 with the official Oracle JDK installed (e.g. this installer) results in the following incorrect error:

ERROR launching 'JD-GUI'

No suitable Java version found on your system!
This program requires Java 1.8+
Make sure you install the required Java version.

I have Oracle's own Java 17 JDK installed. Please fix this.

alexchandel commented 2 years ago

If I merely execute cd /Applications/JD-GUI.app/Contents/Resources/Java && java -jar jd-gui-1.6.6-min.jar with default system PATH, it works. So this is a failure of the "universal" universalJavaApplicationStub.sh.

alexchandel commented 2 years ago

Related: #373

JensHouses commented 2 years ago

here is how you can fix it: https://github.com/java-decompiler/jd-gui/issues/378#issuecomment-1034335797

aolphn commented 1 year ago

@alexchandel thanks,it works for me.

cd /Applications/JD-GUI.app/Contents/Resources/Java && java -jar jd-gui-1.6.6-min.jar