Search code examples
eclipsejava-11repast-simphony

Java jdk not reading packages correctly in Repast Simphony [Windows]


This is the line of code causing the error. import com.vividsolutions.jts.geom.Geometry;

The error message I am currently getting is: FATAL [AWT-EventQueue-0] 14:43:35,367 MessageCenter.INTERNAL.repast.simphony.ui.RSUIPlugin - Fatal error starting Repast java.lang.NoClassDefFoundError: Geometry

I am confused why this error is occurring. I installed the Repast and Eclipse in the same way as the team members who are running the model but am the only one receiving this error.

Any assistance would be greatly appreciated.

For setup of repast:

  1. I installed Repast Symphony from here (https://repast.github.io/download.html)
  2. I installed jdk 11 from Oracle. I added the Java jdk 11 instances to my java home and path variables.
  3. I added the jdk 11 filepath as installed jre for Java in Eclipse.

I am attempting to run a custom Repast model that was previously created ~6 months ago. It runs correctly on multiple team member's machines but not on mine because of a java package issue.


Solution

  • This is not an issue with Java. I am a Repast developer and just wanted to let you know that the installer for Windows and MacOS include a Java runtime as part of the Eclipse distribution, so there is no need for installing Java separately. The error you provided above is caused because the imports for the JTS classes are out of date. Please see the Repast FAQ section that describes how to update the imports:

    Reorganize java imports to reflect new package names by changing any import of:

    com.vividsolutions.jts.* to org.locationtech.jts.*