Eclipse Helios does not recognize Java code beside Scala code

56 views Asked by At

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 Screenshot

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

1

There are 1 answers

0
Jens Piegsa On
  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.