MacOS 上运行jmsToolBox

相关环境

macOS 10.15.5

jmsToolBox 5.7.0

JDK 11

问题描述

MacOS 上运行 jmsToolBox 一直报错。

问题原因

从控制台的日志里一项一项的分析,原因就是 JDK 版本不对, 权限不对。

解决方法

1、首先安装 JDK 11

openjdk 11 我试过了,不行。请安装 Oracle JDK 11,jmsToolBox 需要兼容 osgi.ee 的 JDK 11。

2、删除文件属性

xattr -cr /path/to/JMSToolBox.app

➜  /Applications pwd
/Applications
➜  /Applications 
➜  /Applications xattr -cr JMSToolBox.app 
➜  /Applications

3、添加执行权限

➜  MacOS pwd
/Applications/JMSToolBox.app/Contents/MacOS
➜  MacOS ll
total 96
drwxr-xr-x  3 jiangzhuolin  staff     96 May 10 06:02 ./
drwxr-xr-x  5 jiangzhuolin  staff    160 May 10 06:02 ../
-rw-r--r--  1 jiangzhuolin  staff  47024 May 10 06:01 JMSToolBox
➜  MacOS chmod u+x JMSToolBox                          
➜  MacOS ll
total 96
drwxr-xr-x  3 jiangzhuolin  staff     96 May 10 06:02 ./
drwxr-xr-x  5 jiangzhuolin  staff    160 May 10 06:02 ../
-rwxr--r--  1 jiangzhuolin  staff  47024 May 10 06:01 JMSToolBox*

4、运行

到这儿终于可以正常运行了...

参考 github:

* have a 64 bits JRE (11+) present on the execution path, or configure JMSToolbox to use your own JDK as described here: https://wiki.eclipse.org/Eclipse.ini#-vm_value:_Mac_OS_X_Example (eclipse "init" file is named JMSToolBox.ini)
* in the JMSToolBox.app/Contents/MacOS folder,
    * clear attributes: xattr -cr /path/to/JMSToolBox.app
    * set executable permission on JMSToolBox
* start JMSToolBox
https://github.com/jmstoolbox/jmstoolbox

附:

我在使用 JDK 11 运行以后,再使用 JDK 8 运行也不再报错了!!!

You may also like...

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注