Java Comm API on Linux - run error

I installed the Java Comm API on Linux per the instructions on the web site. The SimpleWrite.java file compiles OK, but when I run it I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: SimpleWrite

Can anyone please explain what I am doing wrong?

TIA,

David Evennou

[330 byte] By [datamstra] at [2007-10-2 8:52:48]
# 1
> Can anyone please explain what I am doing wrong?Yes. You're not searching the board. http://access1.sun.com/FAQSets/newtojavatechfaq.html - very first question
CeciNEstPasUnProgrammeura at 2007-7-16 22:56:31 > top of Java-index,Java Essentials,Java Programming...
# 2
I did search the board, but do not see this particular error.Thanks,David
datamstra at 2007-7-16 22:56:31 > top of Java-index,Java Essentials,Java Programming...
# 3
Really? http://onesearch.sun.com/search/onesearch/index.jsp?qt=Exception+in+thread+%22main%22+java.lang.NoClassDefFoundError&subCat=siteforumid%3Ajava31&site=dev&dftab=siteforumid%3Ajava31&chooseCat=javaall&col=developer-forumsAnd only 116000 hits on
CeciNEstPasUnProgrammeura at 2007-7-16 22:56:31 > top of Java-index,Java Essentials,Java Programming...
# 4

OK, thanks! At first I was getting compile errors, then I added the comm.jar file to the $CLASSPATH environment variable. The java file then compiled OK, so I thought the Classpath was set correctly. Obviously, I need to learn more about Java Classpaths:)

(converting from C++ to Java)

Thanks,

David

datamstra at 2007-7-16 22:56:31 > top of Java-index,Java Essentials,Java Programming...
# 5
One thing to learn is not to use the variable at all, but the -cp/-classpath arguments of java/javac.
CeciNEstPasUnProgrammeura at 2007-7-16 22:56:31 > top of Java-index,Java Essentials,Java Programming...
# 6
Ok, thanks for the tip!David
datamstra at 2007-7-16 22:56:31 > top of Java-index,Java Essentials,Java Programming...