Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.