4

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 test.gy

Within the script I import the Reader:

import au.com.bytecode.opencsv.CSVReader

And this is where it fails...

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Y:\pimconsole\scripts\testcsv.gy: 6: unable to resolve class au.com.bytecode.ope
ncsv.CSVReader
 @ line 6, column 1.
   import au.com.bytecode.opencsv.CSVReader

I thought i had it figured out :/

Mattes
  • 159
  • 1
  • 2
  • 11

2 Answers2

1

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

import com.opencsv.CSVReader

works Sorry :x

Mattes
  • 159
  • 1
  • 2
  • 11
0

I believe this answers your question. Basically, just drop the jar file in your groovy lib directory.

Community
  • 1
  • 1
Craig
  • 2,286
  • 3
  • 24
  • 37
  • Hey, sadly this does not help. I allready got and defined the .jar within my tool (works for others). I also put it now into the lib of groovy itself but still get the same error :/ – Mattes Sep 10 '15 at 14:43