javacompiler-errorsjava.lang.class

Unable to find CsvReader no matter what I try


So I am trying to make the following code work "https://github.com/jintrone/TEVA", only problem is that I am a Java newbie. At first I got compilation error "it.uniroma1.dis.wsngroup.gexf4j.core does not exist" which I solved by downloading and adding gexf4j jar into the ./lib/ folder. Now the compilation is successful but I get:

Exception in thread "main" java.lang.NoClassDefFoundError: com/csvreader/CsvReader

The file I get this from does the following import com.csvreader.*; I downloaded opencsv-2.4.jar and opencsv-3.7.jar and put them in lib but to no avail (also, lib already contains javacsv.jar). I tried to modify the code to import opencsv.csvreader, import au.com.csvreader'... only to get error: package ... does not exist.

Anyone have an idea? these lang issues are tough on a newbie.

Thank you all


Solution

  • Find below a working step by step howto

    1. get the source repository, either by git clone https://github.com/jintrone/TEvA.git or downloading the ZIP file https://github.com/jintrone/TEvA/archive/master.zip
    2. download a missing library from http://central.maven.org/maven2/it/uniroma1/dis/wsngroup/gexf4j/gexf4j/1.0.0/gexf4j-1.0.0.jar and store it in the lib/ directory
    3. build the project ant

    The build will finish with some warnings (had no look after that).

    Then you can start the example as (for more information check the README.md of the project)

    cd deploy/
    java -cp TEvA.jar edu.mit.cci.teva.example.RunSampleCsv ...
    

    edit You might need to amend the file resources/cfinderbatch.properties (before the build with ant) and change the path to the cfinder application.

    cfinderapplication=/usr/local/bin/cfinder
    

    Change the path to your binary CFinder_commandline (e.g. cfinderapplication=/your/path/CFinder_commandline). Following the manual it should be in the top directory where you have extracted the CFinder*.zip archive. Most probably you need to set the executable flag chmod +x CFinder_commandline.

    If all this doesn't solve your problem you might try to contact the CFinder people.