我正在尝试为1.8及更高版本制作一个Minecraft Bukkit服务器,但是java并不能在我的mac终端中作为命令工作。我做拥有最新的Java JDK,但它在终端中无法运行命令... 请帮助
答案 0 :(得分:0)
将java
单独输入终端,并注释输出。如果你得到这个输出:
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server,
because you are running on a server-class machine.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
blah blah blah....
然后安装了java,但是没有设置JAVA_home变量。 此链接可帮助您进行设置:Oracle JDK