you shouldn't be going to where java is installed, but to where you have saved your .java file. and that should be somewhere OTHER than where java is installed. I have a c:\slop directory, but many folks don't like that name.
In any case, to change directories, you need to type "cd path/to/files".
if you are trying to change to a directory with a space in it (like 'program files'), enclose it in double-quotes:
cd "c:\program files"
Note that in windows, once you have 'enough' of the directory typed, you can hit the tab key and it will auto-finish. I think if you have NOT typed enough, it will put in the first match, and you can continue tabbing until you get the dir you want.