Project development

1. Configuration of the Java Runtime.

Basically there are 3 different JDK configurations

  1. The supplied internal JDK of the IDE - currently a JDK 17 only for the operation of the IDE. This JDK should not be used elsewhere in projects

  2. Various possible JDKs that can be added to the IDE globally. Only one of them can be used as a global JDK for projects that do not have their own JDK defined for them.

  3. Each project can define its own JDK from among the JDKs already added to the IDE for itself

In principle, a JDK should always be selected directly for the project at project start either automatically via the global IDE JDK or specifically defined in the project.

Define for the project via: Right click on the project → Properties → Java Build Path → Libraries.

image not found

2. Sudden errors in the project without any apparent reason or changes in the code.

Cause is mostly due to Maven and an error while building the project. What errors can occur:

  • Missing internet connection during maven build

  • Repository server is unreachable

  • Error in the POM.xml

In most cases, a fresh Maven update will help over:

Right click on the project → Maven → Update project.

image not found

In severe cases the option "Force Update of Snapshot/Releases" can be selected

Note:

All ever loaded repositories are cached in the user home in the ".m2" directory. Over time, quite a lot of data is accumulated here and in very severe cases it may also
help to delete this directory once completely.

3. Error in project because internal classes were not created.

Mostly these are classes which are related to the entities in the project, have the same name and an underscore at the end.
These classes are built during the project build via the so-called "Annotation Processing". If this is deactivated, these errors can occur.

  1. You can enable "Annotation Processing" globally via Windows → Preferences → Maven → Annotation Processing or in the project via Right click on the project → Properties → Maven → Annotation Processing.

  2. Then perform a Maven update

image not found

4. Error when starting the project with Tomcat.

In most cases, a fresh Maven update will help over:

Right click on the project → Maven → Update project.