How to set up the trec car java tools on macOS?

30 views
Skip to first unread message

Rohan Chhokra

unread,
Apr 5, 2019, 10:55:34 PM4/5/19
to TREC Car
Hey everyone!
I've really been busting my brains about this but cannot seem to get it right. This is the repository(https://github.com/TREMA-UNH/trec-car-tools-java/tree/12) which I've been using. I am doing the following steps - 
1. Clone the repository
2. cd into the repository and do an "mvn compile"
3. cd into the new target directory into it's classes sub directory 
4. My next command is java edu.unh.cs.treccar_v2.read_data.ReadDataTest paragraphs FILEPATH_TO_A_CBOR_FILE ("unprocessedAllButBenchmark.Y2.cbor").

Can someone please guide me as to where I am going wrong? 

Rohan Chhokra

unread,
Apr 5, 2019, 10:59:21 PM4/5/19
to TREC Car
Almost forgot to mention the error I am getting. 

"Exception in thread "main" java.lang.NoClassDefFoundError: co/nstant/in/cbor/model/DataItem
at edu.unh.cs.treccar_v2.read_data.ReadDataTest.main(ReadDataTest.java:52)
Caused by: java.lang.ClassNotFoundException: co.nstant.in.cbor.model.DataItem
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more"

Laura Dietz

unread,
Apr 6, 2019, 8:15:23 AM4/6/19
to trec...@googlegroups.com
Rohan,

You cannot call a library method from the command line, especially when you are not setting any class path.  Please write your own code and use maven for your dependency management.

See examples on how to use the tools here: https://github.com/TREMA-UNH/trec-car-tools/.

For some example java project on how to read the files, see here:


Best,

Laura

--
You received this message because you are subscribed to the Google Groups "TREC Car" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trec-car+u...@googlegroups.com.
To post to this group, send email to trec...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trec-car/df3d8ced-84ea-4fd9-becb-68e46ab73def%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages