Windows CMD Java not a command

Discussion in 'Bukkit Help' started by MikeA, Aug 6, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    MikeA

    This is not related to Bukkit.

    I am trying to use the java command in windows 7 cmd, but when I type "java" it says unknown command.

    I have the java 5 update 22 for Eclipse and the Java 7 JDK / JRE and the command still won't work.
     
  2. Offline

    Connor Mahaffey

    Java wasn't added to your classpath so it isn't recognized as a command type. I had to do this manually.

    You can look up how to do that. In the meantime, you can something like this:

    C:\Program Files\Java\jre6\bin\java.exe "command"

    so

    C:\Program Files\Java\jre6\bin\java.exe -jar bukkitsnapshot.jar (or whatever it's called)

    Note: Path might be different for you.
     
  3. Offline

    srsdude

    Find your java installation folder
    Highlight address
    Copy address of the folder that has java.exe

    Now
    right click computer
    Then:

    properties
    Advanced system settings
    Environment variables
    Find PATH (or "Path") on the list on the bottom half
    press edit
    go to the very end
    Add a ";"
    Paste
    Press OK
    ????
    Profit
     
Thread Status:
Not open for further replies.

Share This Page