简体   繁体   中英

Java - Eclipse - The declared package “edu.uci.ics.crawler4j.examples.basic” does not match the expected package “”

I am trying to set up the example code for Crawler4j , but Eclipse is throwing an error that I don't understand. The error is:

The declared package "edu.uci.ics.crawler4j.examples.basic" does not match the expected package ""

The path "edu.uci.ics.crawler4j.examples.basic" is there and correct.

You need to run the Java compiler from the base directory, so that it sees the edu/... folder.
If you run it from the directory with the actual .java file, it won't see any folders, so it will expect the default package.

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