Mac下命令终端输入:
[~/desktop]$ native2ascii abc.txt 123.txt
The operation couldn’t be completed. Unable to locate a Java Runtime that supports native2ascii.
Please visit http://www.java.com for information on installing Java.
怎么解决?我已经安装了JDK,也配置了环境变量PATH。
echo $JAVA_HOME
看一下
[~]$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
[~]$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/sbin:/usr/local/bin:.:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin:/Users/liaowenxiong/Applications/nexus-3.20.1-01-mac/nexus-latest/bin:/Users/liaowenxiong/Applications/apache-maven-3.8.4/bin
@liaowenxiong: java
命令可以正常运行吗?