PLANit-Java

In this section we detail how to install PLANit-Java.

Prerequisites

  • Java 11 or higher
    • It likely also works with Java 8 or higher, but this is not tested
  • A Java compatible IDE such as Eclipse
    • Other IDEs are equally suitable, but we assume Eclipse is used

Installing Java

For personal use and academics it is easiest to stick to the Oracle implementation since these are up to data and free of charge for non-commercial use. Java 11 can be downloaded from:

Commercial use if you want to use PLANit-Python, extend it, and embed it in a commercial product, you best avoid using the Oracle Java implementation unless you are willing to pay a subscription fee or get into trouble later down the road because of proprietary components even in their openJDK implementation. No worries though, there are other capable open-source openJDK implementations. Some links below:

After the download, install Java and add it to your path. In case you did not include it in the path during installation; here are the steps to do so manually:

Windows:

  1. Locate the installation directory of Java
  2. Find and open the ‘environment variables’ window, for example via the control panel
  3. Under the system variables, find the ‘path’ entry. Open it, and add a new line with the installation directory of Java supplemented with /bin since the executables we want on the path are in the /bin directory
  4. Apply the changes, close your console window

Mac:

  1. Locate the installation directory of Java
  2. Open a terminal and enter : sudo nano /etc/paths. Enter your password when prompted. (nano is a text editor to edit the path in)
  3. The directories currently part of your PATH appear, now add a new line with the installation directory of Java supplemented with /bin since the executables we want on the path are in the /bin directory.
  4. Press control + X to quit and Y to save changes

Open a new console window, and try java -showversion, it should now show the version and some additional options

Installing Eclipse

Eclipse is a versatile Integrated Development Environment (IDE) with very good Java support. You can download it here ( you likely want to go for the Eclipse IDE for Java Developers):

Setting up PLANit-Java

Currently, the PLANit-Java library is not yet available through a maven dependency. It is therefore easiest to obtain the jar by installing PLANit-Python first. Then, the PLANitXXXX.jar can be copied from the share/planit directory that resides under the Python installation directory and added to your project dependencies in Eclipse.

Alternatively, you can locally compile the various repositories needed to build the PLANitXXXX.jar. To do so, see the PLANitAll repository. This is however not recommended because it requires detailed knowledge of the project structure and/or a lot of experience with Java projects.

Getting Started

Now that you have installed all the necessary components. Have a look at the Getting Started, to create your first PLANit-Java application


Last modified January 1, 0001