I have an Ant project set up. It compiles absolutely fine when run by Ant on the command line. When I import the project into Eclipse using New > Other > From Ant Buildfile, it can't understand the package structure.
I currently have the following Maven like structure:
Root
src
main
java
projectcode
test
java
projectcode
But when I import, it complains that it cannot find the files because the package name do not include "main.java". This is a legacy project and I'd rather not change the imports.
Right click on the project and select Properties and Java Build Path . Then select the Source tab and add src/main/java
and src/test/java
as source directories.
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.