Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java erros - I already tried some solutions #2241

Open
rogerio-bio opened this issue Apr 15, 2024 · 2 comments
Open

Java erros - I already tried some solutions #2241

rogerio-bio opened this issue Apr 15, 2024 · 2 comments

Comments

@rogerio-bio
Copy link

Hello,

I have already posted this on the GitHub page for the nrlx package, but I am coming here to ask for any ideas on how to solve this problem.

I have a model that was built in 6.2.1, which uses the GIS extension, but when opening the NetLogo program itself, it shows the following error:

java.lang.UnsupportedClassVersionError: org/myworldgis/netlogo/GISExtension has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

What I have already done:

  • I uninstalled Java 8 and installed Java 11, but it didn't work;

  • I changed the Java folder destination in the .cfg file to the Java 11 directory, however, the error that occurred with the GIS extension now occurs with the VID extension. I cannot set up the model in either situation.

The only way I can run the model (in nrlx) is by using 6.2.1 and setting JAVA_HOME to the Java 11 directory. However, the problem is that I need to see if my turtles are filling the geographical space of the model, which I can’t do in nrlx, only in the Netlogo itself.

Does anyone have any idea how to resolve this? At this point, I don't even know what to do, as I have always used 6.4.0 without any major issues, and it seems that this version is not recognized in the nrlx package.

Thank you.

@brandesNW
Copy link
Contributor

brandesNW commented Apr 16, 2024 via email

@LaCuneta
Copy link
Contributor

As of NetLogo 6.3.0 all code, including extensions is compiled using Java 17. Java 17 class files are version 55.0 while Java 8 class files are versions 52.0

Just to clarify a bit, NetLogo is compiled with Java 17, but it uses compatibility flags so it should also run with Java 11 (except for the macOS GUI). Java 11 class file version is 55.0. Java 17 class file version is 61.0. I would recommend using Java 17 if possible, though.

NetLogo bundles its own Java environment, so it doesn’t require you to specify JAVA_HOME.

When running through nlrx NetLogo will use whatever Java nlrx is using, the bundled Java for NetLogo shouldn't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants