Brief instruction JAMS development

From ILMS-Wiki
(Difference between revisions)
Jump to: navigation, search
(JAMS)
 
(48 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[de:Kurzanleitung_JAMS-Entwicklung]]
 +
 
==Introduction==
 
==Introduction==
 
The following instruction describes the installation of a JAMS/J2000 development environment using Tortoise (SVN client) and NetBeans (Java-IDE). Of course, alternative software can be used as well.
 
The following instruction describes the installation of a JAMS/J2000 development environment using Tortoise (SVN client) and NetBeans (Java-IDE). Of course, alternative software can be used as well.
  
This instruction is intended for users who extend JAMS, develop new components or who just like to know what exactly happens in JAMS and/or the process components. Moreover, setting up the development environment helps to find and eliminate error sources.
+
This instruction is intended for users who want to extend JAMS or who just like to know what exactly happens in JAMS and/or the process components. Moreover, setting up the development environment helps to find and eliminate error sources.
  
 
===Installation of Required Software===
 
===Installation of Required Software===
Line 8: Line 10:
 
# NetBeans/Java ([http://java.sun.com/javase/downloads/netbeans.html http://java.sun.com/javase/downloads/netbeans.html])
 
# NetBeans/Java ([http://java.sun.com/javase/downloads/netbeans.html http://java.sun.com/javase/downloads/netbeans.html])
  
==Creating Directories==
+
==Preparing the Workspace==
===Downloading Data===
+
===Downloading Sources===
All JAVA sources and scripts for JAMS and its models as well as a series of model datasets are managed within a subversion (SVN) repository [http://subversion.tigris.org]. Subversion is a software for version management of files and directories [http://en.wikipedia.org/wiki/Subversion_%28software%29]. In order to access the JAMS-SVN, a valid SVN account is required.  
+
All sources and scripts of JAMS and its models are managed within a subversion (SVN) repository [http://subversion.tigris.org]. Subversion is a software for version management of files and directories [http://en.wikipedia.org/wiki/Subversion_%28software%29]. In order to access the JAMS-SVN, a valid SVN account is required. For read-only access the account "guest" with password "guest" can be used. For the installation of a JAMS work environment, first the required directories are created and filled with data from the SVN repository.
For the installation of a JAMS work environment, first the required directories are created and filled with data from the SVN repository.
+
 
   
 
   
 
# create directory for JAMS (the example used below is c:\jams)
 
# create directory for JAMS (the example used below is c:\jams)
# create directory for models (the exmaple used belwo is c:\jamsmodels)
+
# create directory for models (the exmaple used below is c:\jamsmodels)
# create directory for model data (the example used below is c:\jamsmodeldata)
+
 
# right click on c:\jams -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/jams/trunk as repository URL -> OK
 
# right click on c:\jams -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/jams/trunk as repository URL -> OK
 
# right click on c:\jamsmodels -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/jamsmodels/trunk as repository URL -> OK
 
# right click on c:\jamsmodels -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/jamsmodels/trunk as repository URL -> OK
# right click on c:\jamsmodeldata -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/modeldata as repository URL -> OK
+
URL -> OK
 +
 
 +
===Downloading Data===
 +
JAMS-SVN also containts a repository with a number of (test) datasets for various models. Please be aware that the overall amount of data in the modeldata repository might be very large. Only single sub-folders should be downloaded here.
 +
 
 +
# create directory for model data (the example used below is c:\jamsmodeldata)
 +
# right click on c:\jamsmodeldata -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/modeldata as repository but don't checkout yet
 +
# use the browse button (right of the repository URL) to select your desired data folders (multiple folders can be entered by holding CTRL) -> OK
  
 
===Directory Structure===
 
===Directory Structure===
As a result, three directories for JAMS, JAMS models and model data are available after the last step.
+
As a result, directories for JAMS, JAMS models (and model data) are available after the last step.
  
In addition to JAVA sources, the JAMS directory contains JAMS binary data and some Ant scripts [http://ant.apache.org] which can be used to create them easily. Moreover, some pre-configured NetBeans projects are in the directory which allow an easy installation of a JAMS development environment.  
+
In addition to JAVA sources, the JAMS directory contains JAMS binary data and some Ant scripts [http://ant.apache.org] which can be used to compile JAMS without Netbeans. Moreover, some pre-configured NetBeans projects are in the nbprojects subdirectory which allow an easy installation of a JAMS development environment.  
  
The model directory contains sub-directories with JAVA sources of different model libraries, which include model components required for creating JAMS models.  
+
The model directory contains sub-directories with JAVA sources of different model libraries, which include model components required for creating JAMS models. Again, this directory contains a nbprojects folder with pre-configured NetBeans projects.
  
 
The data directory contains model definitions and input data for different model applications.
 
The data directory contains model definitions and input data for different model applications.
 
  
 
==Compiling JAMS and Models==
 
==Compiling JAMS and Models==
 
=== JAMS Binary Packages===
 
=== JAMS Binary Packages===
Creating new JAMS libraries is not necessarily required since the JAMS SVN repository contains a current version of all necessary libraries (directory c:\jams\lib). Creating a JAMS development environment and transferring JAMS libraries is only required if JAMS or its standard components are supposed to be modified or debugged. If only components of JAMS models are supposed to be modified, the next step is shown in [[Brief instruction JAMS development#Models (e.g. J2000)|section: Models]].
+
Creating a JAMS development environment and manually building JAMS libraries is only required if JAMS or its standard components are supposed to be modified or debugged. If only components of JAMS models are supposed to be modified, the next step is shown in [[Brief instruction JAMS development#Models (e.g. J2000)|section: Models]].
  
=== Ant-Scripte ===
+
=== Ant Scripts===
Um eine aktuelle Version der JAMS-Bibliotheken zu erzeugen, ist die Einrichtung einer Entwicklungsumgebung nicht zwingend erforderlich. Hierfür kann alternativ ein Ant-Script unter c:\jams\build\build.xml verwendet werden, welches zentral die Übersetzung und Zusammenstellung aller benötigten Ressourcen durchführt. Voraussetzung ist dafür die Installation von Apache Ant, welches von http://ant.apache.org/bindownload.cgi heruntergeladen werden kann.
+
In order to create a current version of JAMS libraries, the installation of a development environment is not obligatory. An alternative Ant script can be used via c:\jams\build\build.xml, which centrally carries out the transformation and compilation of all required resources. The prerequisite for this is the installation of Apache Ant, which can be downloaded at http://ant.apache.org/bindownload.cgi.
  
Zur Erzeugung der JAMS-Bibliotheken mit Ant ist wie folgt vorzugehen:
+
The creation of JAMS libraries with Ant requires the following procedure:
# Kommandozeile im Verzeichnis c:\jams\build öffnen,
+
# open command line in the directory c:\jams\build,
# den Befehl "ant clean" zum Löschen vorhandener JAMS-Bibliotheken aufrufen,
+
# call command "ant clean" for deletion of existing JAMS libraries,
# den Befehl "ant" zum Erzeugen aller JAMS-Bibliotheken aufrufen.
+
# call command "ant" for creation of all JAMS libraries.
  
Diese Schritte können auch durch Ausführen einer Batch-Datei unter c:\jams\build\build.bat durchgeführt werden. Im Ergebnis wird das Verzeichnis c:\jams\bin mit JAMS-Bibliotheken gefüllt, welche alle benötigten Systemklassen sowie verschiedene Standard-Modellkomponenten beinhalten. Gemeinsam mit den Fremdbibliotheken in c:\jams\lib stellen sie die JAMS-API, die Laufzeitumgebung sowie verschiedene grafische Oberflächen zum Erstellen und Ausführen von Modellen oder Auswerten von Modellergebnissen zur Verfügung.
+
These steps can also be carried out by executing a batch file via c:\jams\build\build.bat. Finally, a new JAMS binary distribution will be created in c:\jams\jams-bin, containing all necessary system classes and different standard model components.
  
===Entwicklungsumgebung einrichten===
+
===Creating the Development Environment===
 
====JAMS====
 
====JAMS====
Für JAMS sind bereits vorkonfigurierte NetBeans-Projektverzeichnisse im SVN-Repository enthalten. Zum Öffnen in NetBeans einfach File -> Open Project... wählen und die gewünschten Projekte unter c:\jams\nbprojects auswählen und öffnen. Zum Compilieren eines Projektes (z.B. jams-components) einfach Rechtsklick auf das Projekt -> Clean and Build. Dabei wird die entsprechende Bibliothek (z.B. jams-components.jar) und alle dafür notwendigen Bibliotheken erzeugt und automatisch nach c:\jams\lib kopiert.
+
For JAMS, pre-configured NetBeans projects are already in the SVN repository. To open them, select File -> Open Project... from NetBeans and choose the desired project from c:\jams\nbprojects. Once opened, right-click the project node and select "Build" or "Clean and Build" to clean/build it. The "jams-starter" project is special, as it allows to build the full JAMS binary package and to run JAMS or JUICE. In order to do so, right-click on "jams-starter", choose "Set Configuration" and select your preferred interface, e.g. JUICE. Then, right-click "jams-starter" again and choose "Build" or "Clean and Build". After the build process has finished, right-click "jams-starter" and choose "Run". Please notice that the "jams-starter" build process will create a folder "jams-bin" in the jams folder which includes all required JAMS libraries and the standard components. The "jams-starter.jar" in the "jams-bin" directory can be used to run the chosen interface (e.g. JUICE) without NetBeans. Just either open "jams-starter.jar" or run "java -jar jams-starter.jar" from a command shell.
  
 
====Models (e.g. J2000)====
 
====Models (e.g. J2000)====
# In NetBeans: File -> New Projekt -> Java Project with Existing Sources
+
For J2000, J2000-S and J2000g, pre-configured Netbeans projects are already in the SVN repository. To open them, select File -> Open Project... , choose the desired project from c:\jamsmodels\nbprojects and tick the "Open Required Projects" checkbox. If the "Reference Problems" dialog window pops up upon opening the project, use the "Resolve Problems..." button to specify the storage location of the "jams-api" and "jams-main" projects which are stored in JAMS project folder (e.g. c:\jams\nbprojects). After compiling the project, the results are stored in the "dist" subfolder within the project folder.
# Projektname (z.B. J2000) und Verzeichnis (z.B. c:\nbprojects\J2000) vergeben (hier landen die compilierten Klassen und das JAR-File) -> Next
+
# Source Package Folder -> Add Folder -> c:\jamsmodels\J2000\src -> OK
+
# Import beenden
+
# Bibliotheken einbinden: Rechtsklick auf J2000/Libraries -> Add JAR/Folder... und hier die JAMS-Bibliotheken c:\jams\bin\jams-api.jar und c:\jams\bin\jams-main.jar auswählen. Alternativ können auch direkt die zugehörigen Projekte (c:\jams\nbprojects\jams-api und c:\jams\nbprojects\jams-main) mittels "Add Project..." eingebunden werden, allerdings dauert der Übersetzungsvorgang dann länger.
+
# Rechtsklick auf J2000 -> Clean and Build (Projekt compilieren und J2000.jar in c:\nbprojects\J2000\dist\ erzeugen)
+
  
Diese Schritte werden für alle weiteren aufzusetzenden Projekte (z.B. J2000g und JAMSComponents) entsprechend wiederholt. Unterschiede gibt es jeweils im Umfang der benötigten Bibliotheken (J2000g benötigt z.B. auch J2000). In alle Modell-Projekte müssen mindestens die Bibliotheken jams-api.jar und jams-main.jar eingebunden werden.
+
For other models without pre-configured projects the following steps are needed to create a new project:
 +
# In NetBeans: File -> New Project -> Java Project with Existing Sources
 +
# Indicate project name (e.g. J2000) and directory (e.g. c:\nbprojects\J2000)(the compiled classes and the JAR file are stored here) -> Next
 +
# Source Package Folder -> Add Folder -> c:\jamsmodels\J2000\src -> OK
 +
# Finish import
 +
# Include libraries: right click on J2000/Libraries -> Add JAR/Folder... and select the JAMS libraries jams-api.jar and jams-main.jar from c:\jams\lib\lib.
 +
# Right click on J2000 -> Clean and Build (Compile project and create J2000.jar in c:\nbprojects\J2000\dist\)
  
====Template für JAMS-Komponenten====
+
====Template for JAMS Components====
Ein Komponenten-Template für NetBeans ist unter c:\jams\JAMSmain\JAMSComponent.java zu finden (ggf. vorher anpassen!). Die Einbindung in NetBeans erfolgt wie folgt:
+
A component template for NetBeans can be found at c:\jams\template\JAMSComponent.java (adapt as needed!). The integration into NetBeans is done as follows:
 
# Tools -> Templates -> Java -> Add...
 
# Tools -> Templates -> Java -> Add...
# Oben genanannte Datei auswählen -> Add
+
# Select above-mentioned file -> Add
  
Danach kann beim Anlegen einer neuen Klasse "JAMSComponent" als File Type ausgewählt werden.
+
Afterwards, "JAMSComponent" can be selected file type when creating a new class.
  
==JAMS/J2000 ausführen==
+
==Executing JAMS/J2000==
Zur Ausführung von JAMS (JAMSLauncher oder JUICE) wird das Projekt jams-starter (c:\jams\nbprojects\jams-starter) als Main-Projekt geöffnet (siehe Checkbox im Projekt-Open-Dialog). Dieses Projekt beinhaltet keinerlei JAVA-Quellen, aber alle zum Starten von JAMS notwendigen Bibliotheken sowie zwei Start-Konfigurationen (JAMS-Launcher und JUICE). Ein Umschalten kann über die Drop-Down-Box in der NetBeans-Toolbar erfolgen. Gestartet wird das Projekt über F6, den Start-Button in der NetBeans-Toolbar oder das Kontextmenu (Rechtsklick auf jams-starter). Die beim Start übergebenen Argumente können wie folgt angepasst werden:
+
In order to execute JAMS (JAMSLauncher or JUICE) the project jams-starter (c:\jams\nbprojects\jams-starter) is opened as main project (see checkbox in the project open dialog). This project does not contain any JAVA sources but all libraries required for starting JAMS and two start configurations (JAMS launcher and JUICE). You can switch by using the drop-down box in the NetBeans toolbar. The project is started using F6, the start button in the NetBeans toolbar, or the context menu (right click on jams-starter). The arguments given at the start can be modified as follows:
  
# Rechtsklick auf jams-starter -> Properties -> Run
+
# Right click on jams-starter -> Properties -> Run
# unter "Arguments" eingeben: -c <vollständiger Pfad einer Konfigurationsdatei> -m <vollständiger Pfad einer Modelldefinitionsdatei>. Eine Liste der gültigen Argumente wird bei Verwendung der Argumente -h bzw. --help an der Standardausgabe angezeigt.
+
# Under "Arguments" insert the following: -c <complete path of a configuration file> -m <complete path of a model definition file>. A list of valid arguments will be shown in the default output when using the arguments -h or --help.
  
In der Standardkonfiguration sollte sich nach dem Start der [[JAMS-Launcher]] bzw. [[Grafischer Modelleditor JUICE|JUICE]] öffnen. Über Datei -> Modell Laden... kann nun ein [[Modelldefinition|Modell]] geladen werden.
+
In the default configuration the [[JAMS-Launcher|JAMS Launcher]] or [[Graphical Model Editor JUICE|JUICE]] is supposed to be opened. Via File -> Load model... a [[Model Definition|model]] can be loaded.
  
Für die Ausführung der meisten Modelle ist darüber hinaus die Bereitstellung zusätzlicher Bibliotheken notwendig (z.B. J2000.jar und jams-components.jar). Über Extras -> Einstellungen ändern... können dazu weitere Bibliotheken angegeben werden, die dem Modell dann bei der Ausführung zur Verfügung stehen. Hierzu gehören auch alle Bibliotheken, von denen Modellkomponenten ggf. abhängig sind. Nach Beendigung des JAMS-Launchers werden die vorgenommenen Einstellungen automatisch in der [[Systemkonfiguration|Systemkonfigurationsdatei]] gespeichert.
+
The execution of most models also requires the provision of additional  libraries (e.g. J2000.jar and jams-components.jar). Via Edit -> Change settings... in JAMS additional libraries can be indicated which can be used for the model execution. This also includes all libraries which model components might be dependent on. When finishing the JAMS launcher the settings are automatically saved in the [[System Configuration File|system configuration]].
  
Hinweis: Nach Modifikationen an Modellkomponenten muss vor der Ausführung immer erst die JAR-Datei mit den Komponenten neu erzeugt werden (Schritt 6 in "Entwicklungsumgebung einrichten/Modelle")!  
+
Note: After modifying model components the JAR file always has to be re-generated with the components before the execution. (Step 6 in "Installing the Development Environment/Models")!  
  
<span style="color:#FF0000">'''Achtung:'''</span>
+
<span style="color:#FF0000">'''Please note:'''</span>
  
Für die Funktionen zur 3D-Visualisierung (in den JAMS-Standardkomponenten MapCreator3D und zugehörige Klasse Styled3DMapPane bzw. im WorldWind Viewer) werden plattformabhängige Bibliotheken benötigt, die sich im Verzeichnis "c:\jams\bin" befinden. Sollen diese Funktionen genutzt werden, muss beim Start von JAMS/JUICE der entsprechende Pfad mit dem Parameter "-Djava.library.path=[Pfad]" angegeben werden. Dazu wird der Eigenschaftsdialog von jams-starter geöffnet (Rechtsklick -> Properties) und unter <i>Run</i> der entsprechende Wert im Feld <i>VM Options</i> eingetragen.
+
For the functions of 3D visualization (in the JAMS default components MapCreator3D and corresponding class Styled3DMapPane or in the WorldWind Viewer) platform-dependent libraries are required, which are in directory "c:\jams\bin". If those functions are used, the corresponding path with parameter "-Djava.library.path=[Pfad]" has to be entered when starting JAMS/JUICE. In order to do so, the property dialog is opened by  jams-starter (right click -> Properties) and under <i>Run</i> the corresponding value is inserted into the field <i>VM Options</i>.
  
Ein entsprechender Kommandozeilenaufruf von JAMS für 64-bit Windows-Systeme könnte daher lauten:  
+
As a result, a corresponding command line string for 64-bit Windows systems could look like this:
 
  java -jar juice-starter.jar -Djava.library.path=c:/jams/bin/win64
 
  java -jar juice-starter.jar -Djava.library.path=c:/jams/bin/win64
  
  
 
[[Category:Development]]
 
[[Category:Development]]

Latest revision as of 13:17, 18 May 2018


Contents

Introduction

The following instruction describes the installation of a JAMS/J2000 development environment using Tortoise (SVN client) and NetBeans (Java-IDE). Of course, alternative software can be used as well.

This instruction is intended for users who want to extend JAMS or who just like to know what exactly happens in JAMS and/or the process components. Moreover, setting up the development environment helps to find and eliminate error sources.

Installation of Required Software

  1. Tortoise SVN (http://tortoisesvn.tigris.org)
  2. NetBeans/Java (http://java.sun.com/javase/downloads/netbeans.html)

Preparing the Workspace

Downloading Sources

All sources and scripts of JAMS and its models are managed within a subversion (SVN) repository [1]. Subversion is a software for version management of files and directories [2]. In order to access the JAMS-SVN, a valid SVN account is required. For read-only access the account "guest" with password "guest" can be used. For the installation of a JAMS work environment, first the required directories are created and filled with data from the SVN repository.

  1. create directory for JAMS (the example used below is c:\jams)
  2. create directory for models (the exmaple used below is c:\jamsmodels)
  3. right click on c:\jams -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/jams/trunk as repository URL -> OK
  4. right click on c:\jamsmodels -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/jamsmodels/trunk as repository URL -> OK

URL -> OK

Downloading Data

JAMS-SVN also containts a repository with a number of (test) datasets for various models. Please be aware that the overall amount of data in the modeldata repository might be very large. Only single sub-folders should be downloaded here.

  1. create directory for model data (the example used below is c:\jamsmodeldata)
  2. right click on c:\jamsmodeldata -> SVN Checkout and indicate http://svn.geogr.uni-jena.de/svn/modeldata as repository but don't checkout yet
  3. use the browse button (right of the repository URL) to select your desired data folders (multiple folders can be entered by holding CTRL) -> OK

Directory Structure

As a result, directories for JAMS, JAMS models (and model data) are available after the last step.

In addition to JAVA sources, the JAMS directory contains JAMS binary data and some Ant scripts [3] which can be used to compile JAMS without Netbeans. Moreover, some pre-configured NetBeans projects are in the nbprojects subdirectory which allow an easy installation of a JAMS development environment.

The model directory contains sub-directories with JAVA sources of different model libraries, which include model components required for creating JAMS models. Again, this directory contains a nbprojects folder with pre-configured NetBeans projects.

The data directory contains model definitions and input data for different model applications.

Compiling JAMS and Models

JAMS Binary Packages

Creating a JAMS development environment and manually building JAMS libraries is only required if JAMS or its standard components are supposed to be modified or debugged. If only components of JAMS models are supposed to be modified, the next step is shown in section: Models.

Ant Scripts

In order to create a current version of JAMS libraries, the installation of a development environment is not obligatory. An alternative Ant script can be used via c:\jams\build\build.xml, which centrally carries out the transformation and compilation of all required resources. The prerequisite for this is the installation of Apache Ant, which can be downloaded at http://ant.apache.org/bindownload.cgi.

The creation of JAMS libraries with Ant requires the following procedure:

  1. open command line in the directory c:\jams\build,
  2. call command "ant clean" for deletion of existing JAMS libraries,
  3. call command "ant" for creation of all JAMS libraries.

These steps can also be carried out by executing a batch file via c:\jams\build\build.bat. Finally, a new JAMS binary distribution will be created in c:\jams\jams-bin, containing all necessary system classes and different standard model components.

Creating the Development Environment

JAMS

For JAMS, pre-configured NetBeans projects are already in the SVN repository. To open them, select File -> Open Project... from NetBeans and choose the desired project from c:\jams\nbprojects. Once opened, right-click the project node and select "Build" or "Clean and Build" to clean/build it. The "jams-starter" project is special, as it allows to build the full JAMS binary package and to run JAMS or JUICE. In order to do so, right-click on "jams-starter", choose "Set Configuration" and select your preferred interface, e.g. JUICE. Then, right-click "jams-starter" again and choose "Build" or "Clean and Build". After the build process has finished, right-click "jams-starter" and choose "Run". Please notice that the "jams-starter" build process will create a folder "jams-bin" in the jams folder which includes all required JAMS libraries and the standard components. The "jams-starter.jar" in the "jams-bin" directory can be used to run the chosen interface (e.g. JUICE) without NetBeans. Just either open "jams-starter.jar" or run "java -jar jams-starter.jar" from a command shell.

Models (e.g. J2000)

For J2000, J2000-S and J2000g, pre-configured Netbeans projects are already in the SVN repository. To open them, select File -> Open Project... , choose the desired project from c:\jamsmodels\nbprojects and tick the "Open Required Projects" checkbox. If the "Reference Problems" dialog window pops up upon opening the project, use the "Resolve Problems..." button to specify the storage location of the "jams-api" and "jams-main" projects which are stored in JAMS project folder (e.g. c:\jams\nbprojects). After compiling the project, the results are stored in the "dist" subfolder within the project folder.

For other models without pre-configured projects the following steps are needed to create a new project:

  1. In NetBeans: File -> New Project -> Java Project with Existing Sources
  2. Indicate project name (e.g. J2000) and directory (e.g. c:\nbprojects\J2000)(the compiled classes and the JAR file are stored here) -> Next
  3. Source Package Folder -> Add Folder -> c:\jamsmodels\J2000\src -> OK
  4. Finish import
  5. Include libraries: right click on J2000/Libraries -> Add JAR/Folder... and select the JAMS libraries jams-api.jar and jams-main.jar from c:\jams\lib\lib.
  6. Right click on J2000 -> Clean and Build (Compile project and create J2000.jar in c:\nbprojects\J2000\dist\)

Template for JAMS Components

A component template for NetBeans can be found at c:\jams\template\JAMSComponent.java (adapt as needed!). The integration into NetBeans is done as follows:

  1. Tools -> Templates -> Java -> Add...
  2. Select above-mentioned file -> Add

Afterwards, "JAMSComponent" can be selected file type when creating a new class.

Executing JAMS/J2000

In order to execute JAMS (JAMSLauncher or JUICE) the project jams-starter (c:\jams\nbprojects\jams-starter) is opened as main project (see checkbox in the project open dialog). This project does not contain any JAVA sources but all libraries required for starting JAMS and two start configurations (JAMS launcher and JUICE). You can switch by using the drop-down box in the NetBeans toolbar. The project is started using F6, the start button in the NetBeans toolbar, or the context menu (right click on jams-starter). The arguments given at the start can be modified as follows:

  1. Right click on jams-starter -> Properties -> Run
  2. Under "Arguments" insert the following: -c <complete path of a configuration file> -m <complete path of a model definition file>. A list of valid arguments will be shown in the default output when using the arguments -h or --help.

In the default configuration the JAMS Launcher or JUICE is supposed to be opened. Via File -> Load model... a model can be loaded.

The execution of most models also requires the provision of additional libraries (e.g. J2000.jar and jams-components.jar). Via Edit -> Change settings... in JAMS additional libraries can be indicated which can be used for the model execution. This also includes all libraries which model components might be dependent on. When finishing the JAMS launcher the settings are automatically saved in the system configuration.

Note: After modifying model components the JAR file always has to be re-generated with the components before the execution. (Step 6 in "Installing the Development Environment/Models")!

Please note:

For the functions of 3D visualization (in the JAMS default components MapCreator3D and corresponding class Styled3DMapPane or in the WorldWind Viewer) platform-dependent libraries are required, which are in directory "c:\jams\bin". If those functions are used, the corresponding path with parameter "-Djava.library.path=[Pfad]" has to be entered when starting JAMS/JUICE. In order to do so, the property dialog is opened by jams-starter (right click -> Properties) and under Run the corresponding value is inserted into the field VM Options.

As a result, a corresponding command line string for 64-bit Windows systems could look like this:

java -jar juice-starter.jar -Djava.library.path=c:/jams/bin/win64
Personal tools
In other languages