M2 java 反编译工具 jd-gui安装

安装java 1.8

  • 验证安装
which java
$(/usr/libexec/java_home)
echo $JAVA_HOME
java -verison
```


#### brew 安装

brew install jd-gui


### 已经安装jdk1.8但是Java反编译工具JD-GUI还是报错找不到java 1.8+

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.

![](https://img2023.cnblogs.com/blog/2697130/202304/2697130-20230419131138264-462477041.png)

####  修改sh启动脚本文件
![](https://img2023.cnblogs.com/blog/2697130/202304/2697130-20230419131300107-338689559.png)

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

* 把235行的osascript命令和237行的exit 3注释掉或者删除就行了,然后加上你的java命令路径,
* JAVACMD="/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java"
![](https://img2023.cnblogs.com/blog/2697130/202304/2697130-20230419131531847-537108363.png)
posted @ 2023-04-19 13:16  vx_guanchaoguo0  阅读(201)  评论(0编辑  收藏  举报