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

BigSur ERROR launching 'JD-GUI' #332

Closed
ly8388 opened this issue Nov 14, 2020 · 43 comments · May be fixed by #386
Closed

BigSur ERROR launching 'JD-GUI' #332

ly8388 opened this issue Nov 14, 2020 · 43 comments · May be fixed by #386

Comments

@ly8388
Copy link

ly8388 commented Nov 14, 2020

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.

java-version 1.8

@ly8388
Copy link
Author

ly8388 commented Nov 14, 2020

image
image

@ly8388 ly8388 closed this as completed Nov 14, 2020
@ly8388
Copy link
Author

ly8388 commented Nov 14, 2020

解决了 改了一下sh

@YuriyPikachu
Copy link

怎么改的啊@ly8388

@ly8388
Copy link
Author

ly8388 commented Nov 17, 2020

怎么改的啊@ly8388

查看包文件 macos下有个sh启动文件 搜一下JAVA_HOME 把JAVACMD写死。。。

@skyedai910
Copy link

我这里测试,直接写入 JAVACMD 不生效。将 224-251 行在系统寻找 java 部分注释,然后再写死 JAVA_HOME 后成功启动

@sixawn
Copy link

sixawn commented Dec 15, 2020

大概 250 行,把 JAVACMD="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" 写死系统中安装的目录。

@nuriofernandez
Copy link

nuriofernandez commented Jan 4, 2021

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

@markowkes
Copy link

@xxnurioxx Your solution worked for me

@Remigar2012
Copy link

@xxnurioxx Thanks=)

@BinLee218
Copy link

找到这个注释 在224行# first check system variable "$JAVA_HOME"
在这个上面export一下Jdk目录就完事了
export JAVA_HOME="/Users/aaaa/jdk/java"

@boboZeng
Copy link

boboZeng commented Apr 3, 2021

找到这个注释 在224行# first check system variable "$JAVA_HOME"
在这个上面export一下Jdk目录就完事了
export JAVA_HOME="/Users/aaaa/jdk/java"

这个可以 mac的时候** 空格不用加斜杠\ **

@ngocnd0242
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

@xxnurioxx I tried and working normally. Thank so much!

@SuvanCheng
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

大爱,真强
💗

@funkmonster
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

@xxnurioxx I tried and working normally. Thank so much!

Worked for me too! Fantastic!

@agitrubard
Copy link

agitrubard commented Jul 11, 2021

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

That's absolutely worked!

Screen Shot 2021-07-11 at 7 01 08 PM

@windbelike
Copy link

找到这个注释 在224行# first check system variable "$JAVA_HOME"
在这个上面export一下Jdk目录就完事了
export JAVA_HOME="/Users/aaaa/jdk/java"

That works!

@maazmmd
Copy link

maazmmd commented Oct 15, 2021

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

This works, use vim or nano editor via command line.

@emmanue1
Copy link
Collaborator

emmanue1 commented Oct 15, 2021

@xxnurioxx very good work.
@ngocnd0242 @maazmmd @agitrubard I try to fix that this weekend.
Emmanuel.

@MartinTintin3
Copy link

Someone should make a PR for this

@kevin-lucifer
Copy link

kevin-lucifer commented Nov 1, 2021

I think It's cause by the new authority system in macOS, so far, you can modify the Stub.sh like this(from line 220 to line 254)

image

@zouchengli
Copy link

找到这个注释 在224行# first check system variable "$JAVA_HOME" 在这个上面export一下Jdk目录就完事了 export JAVA_HOME="/Users/aaaa/jdk/java"

这个可以。

@21Chance
Copy link

21Chance commented Jan 4, 2022

@xxnurioxx thanks

@alexlm78
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

Thanks a lot, it works for me.

@qxysg1273
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

Thanks, it works for me.

@domicoder
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

Working

@nikhil2000
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

大爱,真强 💗

it worked,
right click on the application(JD-GUI.app) -> contents ->macos

JacksonBailey added a commit to JacksonBailey/jd-gui that referenced this issue Mar 10, 2022
@JacksonBailey
Copy link

JacksonBailey commented Mar 10, 2022

Someone should make a PR for this

Done. 😎

@JacksonBailey
Copy link

@ly8388 can you please reopen this? Just because there is a workaround does not mean it is fixed.

@terwer
Copy link

terwer commented Apr 7, 2022

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

I think this is the best solution.

@Ryn0K
Copy link

Ryn0K commented Apr 15, 2022

https://i.imgur.com/PLILe0j.png

not able to fix on my side, i have macos monterey 12.3.1.

problem : jd-gui is not opening and no error window also

@yanoshercohen
Copy link

https://i.imgur.com/PLILe0j.png

not able to fix on my side, i have macos monterey 12.3.1.

problem : jd-gui is not opening and no error window also

+1
:\

@terwer
Copy link

terwer commented Apr 15, 2022

https://i.imgur.com/PLILe0j.png
not able to fix on my side, i have macos monterey 12.3.1.
problem : jd-gui is not opening and no error window also

+1 :\

I have macos monterey 12.3.1,too,but it works.

Do you already install jdk11?

export JAVA_HOME=$(/usr/libexec/java_home -v11)

this script tell jd-jui to use jdk11,if you install jdk8,you can set with another script

check your environment,following is the right result.

~ /usr/libexec/java_home -v11 
/Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home
➜  ~ /usr/libexec/java_home -v1.8 
/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
➜  ~ /usr/libexec/java_home -v17 
/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home

image

@JacksonBailey
Copy link

@Ryn0K @yanoshercohen try out my pull request! :)

Build with ./gradlew build. Since it's the gradle wrapper it's super easy to build locally even if you don't have Gradle installed. You just need Java (which you should already have based on the tool haha). In the build folder, unzip jd-gui-osx-1.6.6.zip to get the JD-GUI application.

Please give it a shot and if something doesn't work then comment on my pull request to let me know so we can fix it.

@RickZhou666
Copy link

@terwer thanks a lot! works for me!
image-20220725233936766

@GitPlayB
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

This is AMAZING man!
I've tried adding JAVA_HOME directory and export JAVA_HOME in my .zshrc but it still didn't work, and this finally works. Cheers!

@jonfuller
Copy link

I found a way to get it launched without editing the startup script.

Launch the app from the terminal, setting JAVA_HOME as you're doing it:

JAVA_HOME=`/usr/libexec/java_home -F -v 11` open /Applications/JD-GUI.app

Hope this helps someone!

@ShaneCarr
Copy link

I fixed it by putting something like this:

export JAVA_HOME=$(/usr/libexec/java_home -v11)

At the first line of the file:

/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh

I found this helpful. IF it had been in the readme I wonder if that would help others.

@unionor
Copy link

unionor commented Dec 12, 2023

go to info.plist and remove the + after 1.8 on line 149.
Screenshot 2023-12-12 at 01 43 13

@devnoname120
Copy link

devnoname120 commented Feb 19, 2024

@unionor's solution works for me. Specifically you need to edit this file:

/Applications/JD-GUI.app/Contents/Info.plist

@Boat2017
Copy link

Boat2017 commented Feb 19, 2024 via email

@StevenJack666
Copy link

StevenJack666 commented Feb 19, 2024 via email

@usilitel
Copy link

I could not launch JD-GUI.app, but I launched jar-version of JD-GUI (jd-gui-1.6.6.jar) (downloaded from http://java-decompiler.github.io)

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 a pull request may close this issue.