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

Fixed:JD-GUI not start on MaxOs Big Sur #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joyven
Copy link

@joyven joyven commented Dec 26, 2020

When I tried to open the jd-gui in MacOS Big Sur, I reported the following 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.

In the startup shell script universalJavaApplicationStub.sh, I print the log and find that $Java_ Home is /bin/java. Obviously, it lacks BASE_PATH, track the discovery of branches, and finally enter the following branches:

elif [ ! -z ${JVMVersion} ] && [ -x /usr/libexec/java_home ] && /usr/libexec/java_home -F; then

	if /usr/libexec/java_home -F -v ${JVMVersion} 2> /dev/null; then
		JAVACMD="`/usr/libexec/java_home -F -v ${JVMVersion} 2> /dev/null`/bin/java"
	else
		# display error message with applescript
		osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'\n\nNo suitable Java version found on your system!\nThis program requires Java ${JVMVersion}\nMake sure you install the required Java version.\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
		# exit with error
		exit 3
	fi
elif ...

In this branch, I found that the execution result of command /usr/libexec/java_home -F -v ${JVMVersion} 2> /dev/null was empty, and the error was reported when executing on the command console:

java_home: option requires an argument -- v

Finally, I found that when the v option parameter of java_home command is string containing +, the combination option - F - V cannot be used together.

@joyven joyven changed the title fixed:JD-GUI not start on MaxOs Big Sur Fixed:JD-GUI not start on MaxOs Big Sur Dec 30, 2020
@guxun12
Copy link

guxun12 commented Dec 31, 2020

正好碰到这个问题了, 老铁666

@rocna
Copy link

rocna commented Jan 4, 2021

@joyven
Copy link
Author

joyven commented Jan 12, 2021

正好碰到这个问题了, 老铁666

能帮助到你就好呀😺😸😊😊

@joyven
Copy link
Author

joyven commented Jan 12, 2021

@nuriofernandez
Copy link

Linking #332

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

Successfully merging this pull request may close these issues.

4 participants