Skip to content

NetLogo 6.3.0 not using bundled Java 17 by default on Linux #2171

@EwoutH

Description

@EwoutH

Description:

After updating to NetLogo 6.3.0, which now bundles Java 17, I observed that the application is not utilizing its bundled Java version by default. Instead, it seems to be attempting to use the system's default Java. A clear indication of this issue arose when trying to run the netlogo-headless.sh script, which produced an error suggesting that the Java executable could not be found in the expected location.

Steps to Reproduce:

  1. Install NetLogo 6.3.0 on an Ubuntu system.
  2. Run NetLogo headless (netlogo-headless.sh --version)

Optionally, you can point JAVA_HOME specifically to /opt/netlogo/lib/runtime, but then it attempts to use /opt/netlogo/lib/runtime/bin/java which doesn't exists.

Expected Behavior:

The script should run successfully, displaying the version information and utilizing the bundled Java 17.

Actual Behavior:

Received the following error message:

/opt/netlogo/netlogo-headless.sh: line 35: /opt/netlogo/lib/runtime/bin/java: No such file or directory

Additional Information:

Upon further inspection, it seems that there might have been a change in the directory structure of the bundled Java, causing the netlogo-headless.sh script to look for the Java executable in a non-existent location. This is further suggested by the presence of three folders (conf, legal, lib) and a release file in the /opt/netlogo/lib/runtime directory.

Considering that this version of NetLogo transitioned to bundling Java 17, it's plausible that changes in the directory structure or other settings related to Java 17 are responsible for this discrepancy.

Suggested Solution:

I think three things should be checked:

  • Is Java 17 correctly bundled?
  • Is netlogo-headless.sh compiled correctly considering the (updated) bundled Java?
  • Is the installation documentation up to date, including setting JAVA_HOME?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions