Mattes Mattes - 1 year ago 327
Java Question

Import opencsv library in groovy

again i feel stupid. I want to use the opencsv library. I downloaded it (grab does not work from my network) and defined in my "central configuration" :

this.class.classLoader.rootLoader.addURL(new URL("file:///${currentDir}/lib/opencsv-3.5.jar"))

I now start groovy with the given parameter:

groovy.exe" -Xms1024m -cp .;lib/opencsv-3.5.jar

Within the script I import the Reader:


And this is where it fails...

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Y:\pimconsole\scripts\ 6: unable to resolve class
@ line 6, column 1.

I thought i had it figured out :/

Answer Source

I found the answer: They repacked the stuff and it is now com.opencsv.CSVReader and no longer But it was hard to find that...

import com.opencsv.CSVReader

works Sorry :x

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download