Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 64 Next »

IMPORTANT

Version higher than 8u131 required!

We do not support Java 9 or 10 or 11 or 12 or 13 or 14 or 15 or 16 yet.

Oracle is no longer providing licensing for JDK 8. Therefore, we currently depend on other distributions.

Contents

JDK Installation

Linux

Use apt to install openjdk-8-jdkopenjdk-8-doc, openjdk-8-source.

JavaFX on 16.04 xenial

Install openjfxlibopenjfx-java-doc, and openjfx-source.

JavaFX on 18.04 bionic

Unfortunately, on Ubuntu 18.04, the openjfx package has been upgraded to version 11. To install version 8, run:

# apt install libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-java-doc=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx=8u161-b12-1ubuntu2 openjfx-source=8u161-b12-1ubuntu2

If you have setup the pinned versions as below, you can test it with:

# apt install libopenjfx-java libopenjfx-java-doc libopenjfx-jni openjfx openjfx-source

Note that the JavaFX update version (8u161) does not need to perfectly match the JDK version.

You may need to purge your existing OpenJFX installation:

# apt purge openjfx*
# apt purge libopenjfx*

You may have some luck telling apt to pin the version:

/etc/apt/preferences.d/openjfx
Package: libopenjfx-java
Pin: version 8u*
Pin-Priority: 550

Package: libopenjfx-java-doc
Pin: version 8u*
Pin-Priority: 550

Package: libopenjfx-jni
Pin: version 8u*
Pin-Priority: 550

Package: openjfx
Pin: version 8u*
Pin-Priority: 550

Package: openjfx-source
Pin: version 8u*
Pin-Priority: 550

JavaFX on 19.04 +

Manually install Azul's JDK FX (https://cdn.azul.com/zulu/bin/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64.tar.gz)

Example

$ curl -sL https://cdn.azul.com/zulu/bin/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64.tar.gz -o zulu.tar.gz
$ tar -xvzf zulu.tar.gz
# mv zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64/ /opt/.
# rm /opt/zulu
# ln -s /opt/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64/ /opt/zulu

Jetbrains Runtime

The Jetbrains runtime (customized JDK) is an option for installing on Linux. It provides font rendering fixes. Read more here.

Windows

Azul is providing JDK 8 with JavaFX as part of their community Zulu distribution. You may also reference the official Zulu Installation Guide including the Installation on Windows Using the Zulu ZIP File page.

  1. Visit https://www.azul.com/downloads/zulu-community/?architecture=x86-64-bit&package=jdk-fx
  2. Under Zulu Community Downloads, select:
    1. Java Version: Java 8 (LTS)
    2. Operating System: Windows
    3. Java Package: JDK FX (if not already selected)
  3. Download the zip distribution and extract the contents to a temporary folder
  4. Move the extracted folder to something like C:\Program Files\Zulu\zulu8.46.0.19-ca-fx-jdk8.0.252-win_x64
  5. In Windows > System Properties > Environment Variables
    1. Append the bin directory of the JDK to the PATH variable (i.e PATH=<other_stuff>;C:\Program Files\Zulu\zulu8.46.0.19-ca-fx-jdk8.0.252-win_x64\bin)
    2. Set JAVA_HOME to the JDK directory (i.e JAVA_HOME=;C:\Program Files\Zulu\zulu8.46.0.19-ca-fx-jdk8.0.252-win_x64)
  6. (Optional) Open a new console and check that java -version prints something like the following
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (Zulu 8.46.0.19-CA-win64) (build 1.8.0_252-b14)
OpenJDK 64-Bit Server VM (Zulu 8.46.0.19-CA-win64) (build 25.252-b14, mixed mode)

Note: JDKs are also available from https://adoptopenjdk.net/, but they won't provide JavaFX, which breaks most of IHMC's robotics software.

Mac OS X

Download JDK and JavaFX from https://adoptopenjdk.net/ or https://www.azul.com/downloads/zulu/zulufx/

Download JavaFX 8 from https://www.azul.com/downloads/zulu-community/zulufx/

Needs help

This section needs more info. No one has tried this yet.

Configuration

Logging

See the IHMC Log Tools README for details on enabling different log levels.

Testing

For testing in IDE, see Unit Testing. For testing with Gradle and on Bamboo, see IHMC CI Gradle plugin and Integrating with Bamboo.

JVM options

Increase Stack Size

Use -Xss4m for example to set a custom stack size. Default is 512 KB (-Xss512k)

Increase Heap Size

To set maximum heap size use for example -Xmx512m or -Xmx2g.

To set initial heap size use for example -Xms512m or -Xms1g.

Non-standard options

Use java -X  to print out your specific version of Java's non-standard options. They are hard to find online because they are can be different for each JDK version. For example, here are the options for OpenJDK 1.8.0_232:

$ java -X
    -Xmixed           mixed mode execution (default)
    -Xint             interpreted mode execution only
    -Xbootclasspath:<directories and zip/jar files separated by :>
                      set search path for bootstrap classes and resources
    -Xbootclasspath/a:<directories and zip/jar files separated by :>
                      append to end of bootstrap class path
    -Xbootclasspath/p:<directories and zip/jar files separated by :>
                      prepend in front of bootstrap class path
    -Xdiag            show additional diagnostic messages
    -Xnoclassgc       disable class garbage collection
    -Xincgc           enable incremental garbage collection
    -Xloggc:<file>    log GC status to a file with time stamps
    -Xbatch           disable background compilation
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size
    -Xss<size>        set java thread stack size
    -Xprof            output cpu profiling data
    -Xfuture          enable strictest checks, anticipating future default
    -Xrs              reduce use of OS signals by Java/VM (see documentation)
    -Xcheck:jni       perform additional checks for JNI functions
    -Xshare:off       do not attempt to use shared class data
    -Xshare:auto      use shared class data if possible (default)
    -Xshare:on        require using shared class data, otherwise fail.
    -XshowSettings    show all settings and continue
    -XshowSettings:all
                      show all settings and continue
    -XshowSettings:vm show all vm related settings and continue
    -XshowSettings:properties
                      show all property settings and continue
    -XshowSettings:locale
                      show all locale related settings and continue

The -X options are non-standard and subject to change without notice.

-XX Options

For a list, see The most complete list of -XX options for Java JVM.

Realtime

The IHMC Realtime project contains documentation about IHMC's realtime Java configuration.

More pages:

Java Platform Module System

See Java Platform Module System

Learning Resources

See also

  • No labels