how to set classpath, jarfiles
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
how to set classpath, jarfiles
what classpath mean anyway?? what is different between these twp( classpath, jarfiles)
Re: how to set classpath, jarfiles
Malcolm,
The classpath tells the java compiler where class files exist on your computer. This way if a java file that you are trying to compile has a dependency on another class, the compiler can find it. A classpath setting looks something like this:
javac -classpath c:\myclasses;c:\myjarfiles\myjar.jar MyClass.java
Notice the jar file that is referenced in the classpath? A jar file is a Java Archive. Basically a zip file that contains compiled java class files.
You need to do some reading. Try the tutorials at http://java.sun.com.
Regards,
Scott
The classpath tells the java compiler where class files exist on your computer. This way if a java file that you are trying to compile has a dependency on another class, the compiler can find it. A classpath setting looks something like this:
javac -classpath c:\myclasses;c:\myjarfiles\myjar.jar MyClass.java
Notice the jar file that is referenced in the classpath? A jar file is a Java Archive. Basically a zip file that contains compiled java class files.
You need to do some reading. Try the tutorials at http://java.sun.com.
Regards,
Scott