File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes NoClassDefFoundError with CSVReader? 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 "NoClassDefFoundError with CSVReader?" Watch "NoClassDefFoundError with CSVReader?" New topic

NoClassDefFoundError with CSVReader?

Todd Patrick
Ranch Hand

Joined: Jan 30, 2004
Posts: 31


SunOS 5.8 Generic_117350-27 sun4u sparc SUNW,UltraAX-MP
javac 1.5.0_06
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)


I've been fighting the following error. I don't have a CLASSPATH defined. At this point, Is it an issue with trying to use the CSVReader class?


Exception in thread "main" java.lang.NoClassDefFoundError: au/com/bytecode/opencsv/CSVReader
at dtn.refinedfuels.EAIParser.main(Unknown Source)

[Command ran to produce error]:

java company.refinedfuels.EAIParser

[Ant build.xml file]:

[Java Class]:

[ May 17, 2006: Message edited by: Todd Patrick ]

Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
You need to set the classpath to tell java the location of the opencsv-1.3.jar

something like : (Assuming you are in the build directory to start this.)

java -cp ./;../source/lib/opencsv-1.3.jar company.refinedfuels.EAIParser

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
I agree. Here's the link:
subject: NoClassDefFoundError with CSVReader?
It's not a secret anymore!