I imported a Maven project (File > Import... > Maven > Existing Maven Projects) using Scala source code as well as Java source code into Eclipse Helios. While the Scala source get's recognized correctly the Java code is not recognized.
How can I make Eclipse understand the Java part as well?
Have you tried adding the /src/main/java/
folder as a source folder via:
[right click] > Build Path > Use as Source Folder
This should result in a <classpathentry>
in your .classpath
file.
Sometimes the .project
file misses the Java nature completely:
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> ... <natures> ... <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
Note: your package / project explorer view might be configured to filter '.* resources'. You can also access these files via Strg + Shift + R .
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.