File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NoClassDefFoundError with CSVReader?" Watch "NoClassDefFoundError with CSVReader?" New topic
Author

NoClassDefFoundError with CSVReader?

Todd Patrick
Ranch Hand

Joined: Jan 30, 2004
Posts: 31

[Details]:

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)


[Issue]:

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?


[Error]:

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 ]

--Todd
Carl Trusiak
Sheriff

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: http://aspose.com/file-tools
 
subject: NoClassDefFoundError with CSVReader?
 
Similar Threads
running jar file error:
[Ant]Does not run java task
build.xml ... what am I doing wrong?
How do I use a path as an argument without breaking the -classpath option?
Ant CLASSPATH Question