简体   繁体   中英

JAR not being included in classpath

In my working directory I have the following files : mallet-deps.jar, TopicTest.java and trove-3.0.3.jar but when i run javac -cp mallet-deps.jar:. TopicTest.java javac -cp mallet-deps.jar:. TopicTest.java I get a bunch of import errors saying package doesn't not exist ie

TopicTest.java:3: package cc.mallet.util does not exist import cc.mallet.util.*;

It seems like the Jar is not being included properly, im compiling on Ubuntu 12.04

I think you will need a manifest file that will point to the jar. use ClassPath:

what version of java do you use?
does the reffered jar file really contain the package reported as missing?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM