简体   繁体   中英

Eclipse Helios does not recognize Java code beside Scala code

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.

Eclipse屏幕截图

How can I make Eclipse understand the Java part as well?

  1. 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.

  2. 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.

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