Ok so I've been wrestling with the issue of CLASSPATH and packages for the last week or so, and I'm truely, completely fed up. Maybe there's a kind soul to show me my mistake?
Here's the code
import java.io.*;
import com.Ostermiller.util.*;
public class Extractor {
public static void main ( String args[] )
{
// Create the printer
ExcelCSVPrinter ecsvp = new ExcelCSVPrinter( System.out );
// Write to the printer
try {
ecsvp.writeln( new String[]{"hello","world"} );
} catch (IOException iox){
System.out.println("IO error");
}
}
}
So, I'm importing the java packages and the Ostermiller utils. I simply create a ExcelCSVPrinter instance and I tell it to write out the string array Hello World.
Now this compiles fines, using javac -cp c:\docume~1\britt\mydocu~1\ostermillerutils_1_04_03.jar Extractor.java
But when it try to java Extractor, I get the classic "NoClassDefFound Extractor" error. Even, if I include the same classpath which works for compiling, it still is a no-go.
I have the feeling this is a very basic mistake I'm making here, but I just can't see it.