0

I downloaded the JAR for the LingPipe language tool. (http://alias-i.com/lingpipe) I added some import statements as per their tutorial file here (http://alias-i.com/lingpipe/demos/tutorial/sentiment/src/PolarityBasic.java).

Now I go to compile with:

javac -cp <PATH_TO>/lingpipe-4.1.0.jar:. LingPipeTester.java

After doing this I get errors on the import statments, such as:

LingPipeTester.java:4: package com.aliasi.classify does not exist
import com.aliasi.classify.Classified;

What am I doing wrong here? Thanks for your help.

4
  • Add -verbose:class which will output all class loading. See if your class is being loaded (sounds like not).
    – Steve Kuo
    Mar 18, 2015 at 20:24
  • the -verbose:class option gives me this: javac: invalid flag: -verbose:class Usage: javac <options> <source files> use -help for a list of possible options Mar 18, 2015 at 20:26
  • javac -cp <PATH>/lingpipe-4.1.0.jar:. -verbose:class LingPipeTester.java Mar 18, 2015 at 20:28
  • My bad, -verbose:class is a runtime switch (java). I see that you are trying to compile. In that case I'd check your path to the lingpipe jar.
    – Steve Kuo
    Mar 18, 2015 at 20:55

2 Answers 2

0

you might have to give the absolute path.

<PATH_TO>/C://lingpipe...
4
  • if it's on thesame path use .(dot)/lingpipe.jar
    – blipman17
    Mar 18, 2015 at 20:29
  • using a file that's in thesame directory needs you to use a . (dot) in front of your filepath. or you have to give the absolute path
    – blipman17
    Mar 18, 2015 at 20:37
  • On a mac what would be the absolute path to say, downloads? Do you know? I thought I was giving it the absolute path. Mar 18, 2015 at 20:40
  • Google is your answer my friend. Like this example
    – blipman17
    Mar 18, 2015 at 20:44
0

I solved it by compiling with

javac -cp lingpipe-4.1.0.jar LingPipeTester.java 

Before when I did this I was getting an error on runtime but it was because I wasn't including the current directory in the filepath when running it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.