It's not a secret anymore!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic


smita mishra
Ranch Hand

Joined: May 18, 2006
Posts: 31
here is the directory structure:
C:\ dirA\dirB\dirC\
when i try to compile using the command
1:-c:\javac -cp dirA\dirB\dirC\
it displays the error message
javac: no source files
but when i pass this command
2:-c:\java -cp \dirA \dirA\dirB\dirC\
it compiles successfully. what is the difference between 1st command & 2nd command.

if I am inside dirA i.e c:\dirA>
what should I give as classpath variable to complie & execute
what is relative classpath i.e what is meaning of -cp dirB;dirB\dirC?
if i execute the command c:\dirA> javac -cp dirB;dirB\dirC\ error message is "javac: no source files is found ".
why did I get this error message when file is inside dirC.
marc weber

Joined: Aug 31, 2004
Posts: 11343

Please do not cross-post. It makes people less inclined to take the time to respond when they find the same question has been answered in another forum.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: classpath
jQuery in Action, 3rd edition