Two Laptop Bag
The moose likes Beginning Java and the fly likes -classpath & -sourcepath 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 » Java » Beginning Java
Bookmark "-classpath & -sourcepath" Watch "-classpath & -sourcepath" New topic

-classpath & -sourcepath

Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
what is difference between -classpath option and -sourcepath option?
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Sourcepath tells javac where to grab the source code from.
Classpath tells javac where to grab other class files that will allow your source code to compile.
I agree. Here's the link:
subject: -classpath & -sourcepath
It's not a secret anymore!