2.1. Setup of the Java environment

2.1.1. Download Java

In order to run Osmose, Java need to be installed. Beforehand, let us clarify some of the acronyms regarding the Java technologies.

JVM: Java Virtual Machine. It is a set of software programs that interprets the Java byte code.

JRE: Java Runtime Environment. It is a kit distributed by Sun to execute Java programs. A JRE provides a JVM and some basic Java libraries. A JRE is needed to run Osmose. It can be downloaded from https://www.java.com/fr/download/.

JDK or SDK: Java (or Software) Development Kit bound to the programmer. It provides a JRE, a compiler, useful programs, examples and the source of the API (Application Programming Interface: some standard libraries). A JDK is needed in order to modify the Osmose Java code.

2.1.2. Download Netbeans

In order to modify the Osmose Java core, the Netbeans bundle must be installed in addition to a JDK. It can be found in https://netbeans.org/downloads/

Note

It is highly advised to install together the JDK and the Netbeans bundle: https://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-3413139-esa.html

2.1.3. Modification of the JAVA code

The modification of the Java code is done as follows:

  • Unzip one of the .zip file of the osmose/java directory

  • Open Netbeans

  • Click on Open a project

  • Select the folder that has been extracted (should have a coffee cup icon)

  • Edit the code

  • Clean and build the project by pressing Maj + F11

This new .jar file can be used in the run_osmose function of the Osmose R package.