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

ERROR launching 'JD-GUI' on MacOS #391

Open
qyzhaojinxi opened this issue Apr 11, 2022 · 17 comments
Open

ERROR launching 'JD-GUI' on MacOS #391

qyzhaojinxi opened this issue Apr 11, 2022 · 17 comments

Comments

@qyzhaojinxi
Copy link

qyzhaojinxi commented Apr 11, 2022

JD-GUI.app doesn't start on MacOS. jar fille can start but show nothing when open.

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.

@jonesmith518
Copy link

try open it in terminal like : open /Applications/JD-GUI.app

@qyzhaojinxi
Copy link
Author

QQ20220422-134216@2x

@jonesmith518
Copy link

what's the result of the following command:
java -version
echo $JAVA_HOME
whereis java
if no result, then jdk/jre is needed , try download from oracle website and install the pkg

@ate47
Copy link

ate47 commented Apr 22, 2022

I was having the same issue like 10min ago, my Java home was set to Java 17, I've set it on a Java 11 installation, open it again and it fixed it.

You can get you Java installations with /usr/libexec/java_home -V.

@qyzhaojinxi
Copy link
Author

java -version:

openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12-39)
OpenJDK 64-Bit Server VM (build 17.0.1+12-39, mixed mode, sharing)

echo $JAVA_HOME: no result

whereis java:

java: /usr/bin/java

@FlintyLemming
Copy link

Use following command to launch it manually
java -jar /Applications/JD-GUI.app/Contents/Resources/Java/jd-gui-1.6.6-min.jar

@muthuraj57
Copy link

Thanks @FlintyLemming
I added this in Script Editor and exported it as an Application, to launch it easily through Spotlight.
do shell script "java -jar /Applications/JD-GUI.app/Contents/Resources/Java/jd-gui-1.6.6-min.jar"

@eliu
Copy link

eliu commented May 26, 2022

maybe this link help you find why you got this error and workaround: https://sebastien.andrivet.com/fr/posts/jd-gui-macos/

and this is the cause:

$ /usr/libexec/java_home -F -v 1.8+
The operation couldn’t be completed. Unable to locate a Java Runtime that supports (null).
Please visit http://www.java.com for information on installing Java.

@viquu
Copy link

viquu commented Jun 1, 2022

maybe this link help you find why you got this error and workaround: https://sebastien.andrivet.com/fr/posts/jd-gui-macos/

and this is the cause:

$ /usr/libexec/java_home -F -v 1.8+
The operation couldn’t be completed. Unable to locate a Java Runtime that supports (null).
Please visit http://www.java.com for information on installing Java.

great. i modify the Info.plist, then jd-gui is work.

@jonesmith518
Copy link

maybe this link help you find why you got this error and workaround: https://sebastien.andrivet.com/fr/posts/jd-gui-macos/
and this is the cause:

$ /usr/libexec/java_home -F -v 1.8+
The operation couldn’t be completed. Unable to locate a Java Runtime that supports (null).
Please visit http://www.java.com for information on installing Java.

great. i modify the Info.plist, then jd-gui is work.

@viquu hey, thanks for the hint, and finally opened successfully by modify the Info.plist : change the key: JavaX->JVMVersion from 1.8+ to 1.8

@fade03
Copy link

fade03 commented Jun 2, 2022

maybe this link help you find why you got this error and workaround: https://sebastien.andrivet.com/fr/posts/jd-gui-macos/

and this is the cause:

$ /usr/libexec/java_home -F -v 1.8+
The operation couldn’t be completed. Unable to locate a Java Runtime that supports (null).
Please visit http://www.java.com for information on installing Java.

Great!!

@ChronosSong
Copy link

I change /usr/libexec/java_home -F -v to /usr/libexec/java_home -F -V it ran successfully

231         if /usr/libexec/java_home -F -V ${JVMVersion}; then
232                 JAVACMD="`/usr/libexec/java_home -F -V ${JVMVersion} 2> /dev/null`/bin/java"

@shrugalic
Copy link

shrugalic commented Jan 30, 2023

Use following command to launch it manually
java -jar /Applications/JD-GUI.app/Contents/Resources/Java/jd-gui-1.6.6-min.jar

This worked for me, but I only found this after editing /Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh to add the following on line 224, which also worked fine:

JAVA_HOME=`/usr/libexec/java_home -v 11`

I have multiple Java versions installed, but GD-GUI did not launch with 1.8 nor 17 version in the above file.
(You can run /usr/libexec/java_home -V in a Shell to list all installed Java versions)

The quoted method is nicer though, because it shows that JD GUI is not compatible with Java 17 class Files in the Shell it launched in, even when a Java 17 is used to launch it.

@0xcopv
Copy link

0xcopv commented Sep 26, 2023

i have solved this problem. Macosx doesn't understand version 1.8+. Therefore, i will have to change version java from "1.8"+ to "1.8" in file Info.plist.
image

@deadlove
Copy link

Use following command to launch it manually
java -jar /Applications/JD-GUI.app/Contents/Resources/Java/jd-gui-1.6.6-min.jar

This worked for me, but I only found this after editing /Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh to add the following on line 224, which also worked fine:

JAVA_HOME=`/usr/libexec/java_home -v 11`

I have multiple Java versions installed, but GD-GUI did not launch with 1.8 nor 17 version in the above file. (You can run /usr/libexec/java_home -V in a Shell to list all installed Java versions)

The quoted method is nicer though, because it shows that JD GUI is not compatible with Java 17 class Files in the Shell it launched in, even when a Java 17 is used to launch it.

yes, jdk17 is my default java, and it does not work. So using your way, it works fine

@hbprotoss
Copy link

i have solved this problem. Macosx doesn't understand version 1.8+. Therefore, i will have to change version java from "1.8"+ to "1.8" in file Info.plist. image

you saved my time

@CarlesLlobet
Copy link

i have solved this problem. Macosx doesn't understand version 1.8+. Therefore, i will have to change version java from "1.8"+ to "1.8" in file Info.plist. image

This is the best solution by far!! Thanks 0xcopv 🚀

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