Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoClassDefFoundError after adding Opencsv jar to project

I've added the open csv jar to my project to enable data to be written out to file in csv format.

The jar file was added using the following steps:

1.Properties --> Add external jars --> opencsv-3.1.jar
2.Order & Eport tab --> tick, opencsv-3.1.jar

But when I run the project I get an error stating that one of the methods belonging to the opencsv jar cannot be found: java.lang.NoClassDefFoundError: com.opencsv.CSVWriter

Does anyone know how to resolve this error or am I missing some step in adding the jar to the project?

`

like image 609
Brian Var Avatar asked Apr 22 '26 09:04

Brian Var


1 Answers

See javadoc of API

CSVWriter is in au.com.bytecode.opencsv package

like image 125
Tkachuk_Evgen Avatar answered Apr 24 '26 23:04

Tkachuk_Evgen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!