It's not a secret anymore!
The moose likes Beginning Java and the fly likes Setting classpath to compile .java files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Setting classpath to compile .java files" Watch "Setting classpath to compile .java files" New topic

Setting classpath to compile .java files

Kirk Gao

Joined: Aug 30, 2007
Posts: 8
I can't seem to be able to compile any .java files yet because they're somehow not being found. Javac is being recognized as a command, just to get that out of the way. I am, to the best of my knowledge, setting the classpath correctly (not confusing PATH with classpath) and putting my .java files in my intended directories. Do the files need to be put in a predetermined location or something?
Roger F. Gay
Ranch Hand

Joined: Feb 16, 2007
Posts: 408
Seems like you're saying that you did everything right? From your description, I can only think to ask whether your classes are in packages. That can cause confusion at times.

If that's not the case, it might help for you to give a more detailed account to give us a better chance of seeing what the problem is.

Correlation does not prove causality.
jQuery in Action, 3rd edition
subject: Setting classpath to compile .java files
It's not a secret anymore!