Problem in packages when importing to Eclipse

I am trying to import some existing projects into Eclipse. Structures for their packages:

Project/
        /src
          /java
             /a
              /b
                /c

After importing in the package explorer, I see:

Project
  src/java
       --a
         --b
            --c
               - AClass.java

This is normal since classes, for example. AClass.java are defined in the package: a.b.c But in one project, the structure (after import) becomes:

Project
  src
     --java
        --a
          --b
            --c
              - AClass.java

And this causes the error that the AClass.java class is defined in the package a.b.c, but in fact it is under java.a.b.c
Why is this happening? Why is java not ignored as part of the package in this particular project?
Thanks

+5
source share
4 answers

Eclipse? , "java" , "src". , , .

+7

. -right → → →

. → .

, , src eclipse.

Eclipse

+5

,

, java/main/org/goal/Main.java

- java.main.org.goal;

else Ctrl +1

0

import java.io.*; java . .

:

Java, , , . - .

, , java_installation/java/io:

import java.io.*;

0

All Articles