Reputation: 2997
Not sure if this an appropriate community to ask this question. But still asking, recently in order to reorganize my messed and confusing Java project, I did some changes in folder structure, Like renaming, Capitalizing the Java class file names, etc.
Now, when I open the project in Netbeans, it works perfect, even compiles and runs as normal, but the imports of different classes in project are still pointing to the older folder structure.
e.g. just for representational purpose, I have a class named Operator in folder Data. This used to be operator in folder model.
So the import should be now Data.Operator
, however it still imports it as model.operator
I am quite surprised, how is it even working then. Any idea how can I reset this and change the imports to the new folder structure.
Upvotes: 0
Views: 604
Reputation: 5798
you should never change the classes via your filesystem.
All good IDE's have refactoring support that allows you to quickly and complety 'refactor' your code. This include renaming of classes, moving of classes en such. These refactoring tools will change all imports for you as you refactor.
on a sidenote: a package name should never start with a capital
Upvotes: 1