Skip to content

5.4 Run

Pascal Hürlimann edited this page May 9, 2019 · 2 revisions

Explanation

Launches an instance of Jetty, running a debuggable, hot-swap enabled instance of jazz. The run task creates necessary configuration files with every launch, and collects information on all configured plugins. All of this information is made available to the launched environment. This means that changes to the user configuration are automatically applied the next time a run time is launched.

Please note that the run task can get quite a while to get started. Usually, once you can see this log message on the terminal:

An error has occurred. See the log file
/home/sbi/workspaces/jazz/jazz-development-environment/jde/runtime/6.0.6/workspace/.metadata/.log.

the environment should be available at https://localhost:7443/jazz. However, you might still have to wait a few seconds for the database to start and attach. The debugger runs on port 9999, and can be attached to in several means, such as through the remote debugger of your IDE.

Also note that it is completely normal for a variety of error messages to pop up. It's in the nature of this setup not being a complete rtc instance that many errors will occur. Generally, if you see something in the browser eventually, things are just fine.

Lastly there can always only be at most one run time running at any given time. If you wish to run another, you have to stop one and start the next. This limitation makes keeping settings in other tools, such as debug options in IDEs etc. easier to keep track of.

Requirements

There needs to be at least one available run time, so the setup task must have run for at least one sdk version. In fact, the run task is not even available if there is not at least one run time.

Arguments

Run takes one parameter, -Pruntime, for choosing which run time to start. In general, this is the name of a folder in the jde/runtime folder. The run task will always default to running the latest version available.

Note that this is the only parameter at the project level (-P) and not at the task level (--). This is due to limitations of parameter handling in gradle, and changes nothing for you as the user, except having to be careful which format to use.

Default

If no argument is supplied, run defaults to the latest version available.

Short examples

  1. run latest version: ./gradlew run
  2. run specific version: ./gradlew run "-Pruntime=6.0.3"

Examples

Simple run

  1. Make sure that you have at least one run time available. Your folder structure should look comparable to this (only relevant files shown):
jde
├── dbs
└── runtime
    └── 6.0.6
        ├── conf
        ├── db
        ├── jre
        └── sdk
  1. Execute the run task. Especially on the first launch, this will take a while.
./gradlew run

On Windows, this will launch a new powershell window, in which the jetty server is launched.

On Linux, this will also launch a new terminal window. Please take not of the linux settings for determining which terminal emulator is used.

  1. Launching will take a while. As noted in the explanation, wait for the appropriate error message, and then connect to https://localhost:7443/jazz

  2. It will take a while for everything to load. Once the login screen pops up, you can log in with the credentials TestJazzAdmin1/TestJazzAdmin1

  3. To end the current session, you can either press Ctrl + C in the terminal window, or simply close it.

Running a specific version

  1. This only makes sense if you have more than one run time available. For example:
jde
├── dbs
└── runtime
    ├── 6.0.3
    │   ├── conf
    │   ├── db
    │   ├── jre
    │   └── sdk
    └── 6.0.6
        ├── conf
        ├── db
        ├── jre
        └── sdk
  1. In this configuration, executing ./gradlew run will always launch 6.0.6 because it is the most recent version.
  2. However, we can run a specific run time:
./gradlew run "-Pruntime=6.0.3"

Steps 4 and 5 are just like in the simple example.