2015-07-12 36 views
-4

我正在尝试为1.8或更高版本创建一个Minecraft Bukkit服务器,但是java在我的Mac终端中不能用作命令。我有最新的Java JDK,但它并不在我的终端工作的命令...... 请帮助Java在我的Mac终端上无法识别

+1

在您的'.Bash'文件中创建'Java_home'。去谷歌上查询 !! – Shahzeb

+0

设置'JAVA_home'系统环境变量,并将其添加到'PATH'变量中。谷歌会告诉你如何做到这一点。 – Tom

+0

我该如何做这些事情对不起,我是一个完整的计算机noob(谷歌不帮助“ –

回答

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

+0

(-bash:java:command not found)...是我没有括号收到的输出 –

+0

你为什么请问我做了什么,然后不回应? –

+0

hello again转到oracle并再次安装java – richbrz