java newbie question

by 7 replies
8
Hey I have just started doing an online course in Java but have hit an early stumbling block
I am told to enter "cd c:\java" into the command proment but each time i do i get an error message saying windows cant find cd

any ideas?
#programming #java #newbie #question
  • sounds like your system path is messed up. cd is a built in command in the command prompt (it stands for "change directory"), but it's also an actual executable in your system folder (you'll need to figure out exactly where it's located). If your operating system doesn't know where to look for it, it will throw an error. This information is kept in a system variable called PATH, which is just a big string of paths separated by a colon or semi-colon (I forget which). This path tells your system which directories to look for executables when they are used as commands.

    If you've never changed your PATH before, you should probably study it first. It's a pretty helpful thing to know about as a developer. How do I set or change the PATH system variable?
  • thanks I will have a look at that later
  • I am still having a problem with it and on all computers
    My desk top (xp pro) my laptop and my friends laptop (Win 7)

    all have the same message cant find CD
    Is there an other way to test and play a java file
    • [1] reply
    • All of your computers can't possibly have a messed up PATH. Are you sure it's saying it can't find "cd", or is it just that it can't find c:\java ?

      remember DOS? you can type "dir" and see all the files and resources when you're in each directory. You should be able to "cd" to any of the directories you see.

      Are you sure you're in the command line? The command line looks something like this:

  • hey
    Just watched a tutorial on youtube
    Before I was typing cd into the run application but I think that might have been wrong
    I have now typed it into the command prompt window and seemed to work but I cant see the directory the file is saved in
    When i type c:\java or any other file i cant see it

    I am on my lap top am now going to check it on a desk top
  • may you find a problem that happens before you activate it?
  • cd does not show you the files.
    It switches the prompt to that path.

    eg cd c:/java
    would switch your prompt to C:\java > _Cursor_

    Then the command dir will list the directories and files.
    If your going to be doing things in command line, you should first be getting familiar with the commands and what they do...

    XP reference Microsoft Corporation

    Some more references
    Windows CMD Commands

Next Topics on Trending Feed

  • 8

    Hey I have just started doing an online course in Java but have hit an early stumbling block I am told to enter "cd c:\java" into the command proment but each time i do i get an error message saying windows cant find cd