literally just starting java... - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

literally just starting java...

kyle11778kyle11778 Posts: 11Member
so i am taking a java course and want to start early on leaning it since i have the book. i downloaded java and java jdk 6. i made the basic "Hello world" program. opened cmd prompt and put in "javac Welcome.java". gives me some error. this is some of the command prompt errors i get---
[code]
C:Users****>C:Program FilesJavajdk1.6.0_21injavac Welcome.java
'C:Program' is not recognized as an internal or external command,
operable program or batch file.

C:Users****>C:ProgramFilesJavajdk1.6.0_21injavac Welcome.java
The system cannot find the path specified.

C:Users****>C:Program_FilesJavajdk1.6.0_21injavac Welcome.java
The system cannot find the path specified.
[/code]

let me know thanks...

Comments

  • silveredge52silveredge52 Posts: 198Member
    Hey,
    In the first instance, the space in path throws the computer off. Try this:
    [code]"C:Program FilesJavajdk1.6.0_21injavac" Welcome.java[/code]
    Note, your java program needs to be in the directory you "[color=Orange]are in[/color]" when you issue the command to compile.

    Life will be easier if you add the path to the java programs into you Path system environmental variable. Follow this [link=http://www.java.com/en/download/help/path.xml]link[/link]. Note you will probably modify an existing path variable and that each "path" ends with a semicolon except the last.

    Then you will only need to issue the javac/java command with out specifying the path to the command program.

    gl,
Sign In or Register to comment.