Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,
I just wrote my first project in java with eclipse. I installed eclipse saying it that the working space is a certain folder (%userprofile$\eclipse\workspace, with sources into the src subfolder and the compiled files into the bin folder).
I made the first Project (MyProject, eclipse made this folder for me), and wrote some sources with a certain pakages (myProject.calc and java.util.myUtil).

Eclipse don't want that thoose files remain in the right folders, but twice them (instead %userprofile$\eclipse\workspace\src\myProject\calc\SourceFile.class, it wants that they are to be saved in %userprofile$\eclipse\workspace\src\myProject\calc\myProject\calc\SourceFile.class)
If the twicing is not present, the compiler returns an exception (the declared package does not match the expected package). If the twicing is present, the compilation performs a problem (The project cannot be built until build path errors are resolved)
Posted

1 solution

Hi,
I found a workaround, but knowing the cause. I hope this will not be happen any more :-)
I copied source files somewhere, delete and recreated the project, created the classes and copied the content of the files.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900