I have never used a jar based library before. After having had problems getting javac to compile a .class properly, I got that figured out and got a successful compile with this batch file:
C:\z\java\jdk1.6.0\bin\javac -classpath C:\z\marc4j\marc4j-2.4\lib\normalizer.ja
r;C:\z\marc4j\marc4j-2.4\marc4j.jar %1.java
To execute with java, I made this "run" batch file:
C:\z\java\jdk1.6.0\bin\java -classpath C:\z\marc4j\marc4j-2.4\lib\normalizer.jar
;C:\z\marc4j\marc4j-2.4\marc4j.jar %1
This produces the following response:
Exception in thread "main" java.lang.NoClassDefFoundError: hw
The source I'm compiling is called "hw.java" and looks like this:
import org.marc4j.MarcReader;
class hw
{
public static void main(String [] args)
{
System.out.println("It runs!");
}
}
Everything seems ok to me, so where did I go wrong?
TIA