I am fairly new to Java and I am trying to understand how to add .jar files to my classpath. Specifically I want to be able to import the Stanford coreNLP Library. After downloading and unzipping coreNLP, I get 4 jar files that I need to add to my classpath which are called
stanford-corenlp-3.3.1.jar
stanford-corenlp-3.3.1-models.jar
xom.jar
joda-time.jar
This SO post shows that I can do this by writing a command that includes the location of the .jar files and the path to the package hierarchy. I obviously know the location of the .jar files but I do not know what the path to the package hierarchy should be. I have tried
java -cp stanford-corenlp-3.3.1.jar;stanford-corenlp-3.3.1-models.jar;xom.jar;joda-time.jar
but this is clearly wrong because it only includes the .jar files. Can someone give me some direction on how to modify the above command? Thanks
EDIT:
The new command that I have tried is
java -cp stanford-corenlp-3.3.1.jar;stanford-corenlp-3.3.1-models.jar;xom.jar;joda-time.jar edu.stanford.nlp.pipeline.StanfordCoreNLP
as per the suggestions. However this produces the same error of
-bash: stanford-corenlp-3.3.1-models.jar: command not found
-bash: xom.jar: command not found
-bash: joda-time.jar: command not found
Just to be clear, all I want to do is be able to use
import edu.stanford.nlp
in my java file. Also I am using a mac.