I have exported my Eclipse Java project in Ubuntu, with all the .java and .class files in place.
The project is composed as follows:
- src
- package1
- file1.java
...
- fileN.java
...
- packageM
- fileM.java
...
- fileN.java
To run the program, I use the following command:
java -Djava.library.path="/path/to/opencv/lib" -cp lib/*:src package.to.main.class.MainClass
Now, I have changed just a line in a class (which is not the MainClass), and I would like to recompile and run everything. However, when trying with javac in the following way:
javac path/to/main/class/MainClass.java
I obtain millions of errors since:
- libraries are not found
- other Java files are not linked
Some examples:
src/it/polimi/tweetcrawlingpipeline/pipeline/TweetCrawlingPipeline.java:7: error: package org.opencv.core does not exist
import org.opencv.core.Core;
^
symbol: class SVMSample
location: class TweetCrawlingPipeline
src/it/polimi/tweetcrawlingpipeline/pipeline/TweetCrawlingPipeline.java:158: error: cannot find symbol
public GenericClassifier<SVMSample> getTextClassifier() {
^
How can I fix these problems?
Thanks.
-cp) where the compiler can find these library jars and other files..classfiles are. For example:javac -cp path/to/your/project/;path/to/your/to/libraries path/to/main/class/MainClass.java.classfiles?