| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
NetLogo Desktop extensions can be written in Java or Scala. This page documents the steps needed to set up your development environment, which can be used without modification to create an extension using either language.
NetLogo runs on Java 17, which can be found at one of the following links, based on your OS/platform:
After downloading, extract the archive and move it to any location of your choosing. To ensure that SBT can find your installation of Java, you'll need to add it to your system PATH. To do this, follow the steps below for your operating system:
Windows
Open the Start menu and search for "environment variables". You should see an option that reads "Edit the system environment variables". Click on it, then click on "Environment variables" at the bottom right of the dialog. Under the section titled "System variables", search for the entry called "Path", and double-click on it to edit it. Click the "New" button at the top right of the dialog to add a new entry, then enter the full path to the bin directory inside of your Java installation. For example, if you chose to place Java in Program Files, the entry would look like C:\Program Files\jdk-17.0.2\bin. Make sure to use backslashes as path separators here, per Windows convention.
Mac
Using your preferred text editor, open your shell profile (eg. ~/.bashrc for Bash, ~/.zshrc for Zsh). Add the following line at the bottom of the file: export PATH=$PATH:<java>/Contents/Home/bin, where <java> is the path to your Java installation. For example, if you chose to place Java in your home directory, this line would look like export PATH=$PATH:~/jdk-17.0.2.jdk/Contents/Home/bin.
Linux
As in the previous section, open your shell profile. Add the following line at the bottom of the file: export PATH=$PATH:<java>/bin, where <java> is the path to your Java installation. For example, if you choose to place Java in your home directory, this line would look like export PATH=$PATH:~/jdk-17.0.2/bin.
To ensure that you installed Java correctly, run the command java --version in the command line. You should see something along the lines of the following message:
openjdk 17.0.2 2022-01-18 OpenJDK Runtime Environment (build 17.0.2+8-86) OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
NetLogo uses SBT to manage dependencies and build the source code, so for compatibility and ease of setup we recommend that extension authors use SBT as well. If you are already familiar with an equivalent build tool such as Maven or Gradle, you are welcome to use it instead, but you won't be able to reuse any of the build code from existing extensions.
You can download SBT using this link. After downloading, extract the archive and move it to any location of your choosing. To make sure your computer can find SBT when you try to use it, you'll need to add it to your system PATH. To do this, follow the steps below for your operating system:
Windows
Follow the steps in the section above until you get to the system PATH dialog. Click the "New" button at the top right of the dialog to add a new entry, then enter the full path to the bin directory inside of your SBT installation. For example, if you chose to place SBT in Program Files, the entry would look like C:\Program Files\sbt\bin.
Mac/Linux
As in the previous section, open your shell profile. Add the following line at the bottom of the file: export PATH=$PATH:<sbt>/bin, where <sbt> is the path to your SBT installation. For example, if you chose to place SBT in your home directory, this line would look like export PATH=$PATH:~/sbt/bin.
To ensure that you installed SBT correctly, run the command sbt --version in the command line. You should see something along the lines of the following message:
sbt runner version: 1.12.12 [info] sbt runner (sbt-the-shell-script) is a runner to run any declared version of sbt. [info] Actual version of the sbt is declared using project/build.properties for each build.
The latest release of NetLogo Desktop as of the creation of this section of the wiki is NetLogo 7.0.4, which can be found here. Make sure you have this version installed before continuing.
| Back | FazBrowse Home | New Git URL |