[英]Force java path mac
Before you answer "export JAVA_HOME=whatever >> ~/.bash_profile", just know it won't work. 在您回答“导出JAVA_HOME =所有>>〜/ .bash_profile”之前,只知道它不起作用。 I even restarted my terminal and typed
echo $JAVA_HOME
, and got the right path. 我什至重新启动了终端并键入
echo $JAVA_HOME
,并获得了正确的路径。
How do you force (and I mean FORCE, not tell-java-it-exists) a custom path for the java home directory. 您如何强制(我的意思是强制,而不是告诉java-it-exists)java主目录的自定义路径。 My java 7 in installed in
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
. 我的Java 7安装在
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
。 Java doesn't recognize the java path. Java无法识别Java路径。 When I type
java -version
, it says 1.7.10_60
. 当我输入
java -version
,它表示1.7.10_60
。 But, when I type java -version:1.7.10
, it says it doesn't exist. 但是,当我输入
java -version:1.7.10
,它说它不存在。 When I launch my binary, it says Java 7 is required. 当我启动二进制文件时,它说需要Java 7。 It is a UNIX executable, and won't launch with the
java
command (with or without -jar
). 它是UNIX可执行文件,不会通过
java
命令(带有或不带有-jar
)启动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.