Skip to content

Setting up Eclipse

Will Dazey edited this page Mar 6, 2023 · 5 revisions

How to setup your EclipseLink development Environment in Eclipse

This is a guide for new users to setup their EclipseLink dev environment so that they can create changes and propose pull requests

Prerequisite steps:

Step 1 : Download and Install Eclipse IDE

Step 2 : Import EclipseLink projects

Step 3 : Set project variables

These are necessary classpath variables that must be set in order for many of the EclipseLink projects build path to be satisfied. These variables are set within Eclipse via: Windows > Preferences > Java > Build Path > Classpath Variables

  • Name: ECLIPSELINK_HOME

    Set this value as the path on your local system from root to the EclipseLink source code (ie. C:/JPA/EclipseLink/master/trunk/eclipselink)

Step 4 : Setup the EclipseLink formatter

  1. Navigate to: Windows > Preferences > Java > Code Style > Formatter
  2. Click Import, and navigate to the following EclipseLink directory in your local, checkedout source code: https://github.com/eclipse-ee4j/eclipselink/tree/master/project-admin/EclipseLink-Eclipse-Format.xml
  3. Click Apply and Close to apply this formatter

Known issues

The project was not built due to "Build path contains duplicate entry: 'module-info.java' for project 'org.eclipse.persistence.core'". Fix the problem, then try refreshing this project and building it since it may be inconsistent
Resolution
  1. Navigate to the org.eclipse.persistence.core .classpath
  2. Add excluding="**/module-info.java" to the following element in .classpath:
<classpathentry excluding="**/module-info.java" kind="src" output="target/test-classes" path="src/test/java">
    ...
</classpathentry>

Next steps: