Info | ||
---|---|---|
| ||
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. |
Warning |
---|
Oracle is no longer providing licensing for JDK 8. Therefore, we currently depend on other distributions. |
We currently run Java 17.
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
|
JDK Installation
...
Ubuntu
OpenJDK is the recommended JDK to install.
OpenJDK
Multiexcerpt | ||
---|---|---|
| ||
Use apt to install |
...
|
...
|
...
JavaFX on 16.04 xenial
Install openjfx
, libopenjfx-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:
Code Block | ||
---|---|---|
| ||
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
Code Block |
---|
$ 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 |
Alternatively will can use SDKMAN! which is a package manager for Gradle, Java, and many other frameworks on Ubuntu.
Following the SDKMAN! install instructions:
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
Before starting, a useful command to remember is "list" which shows all available versions:
sdk list java
Now install JavaFX and (optionally) Gradle using two easy commands:
...
Note, the JDK will be installed in a hidden folder located at:
~/.sdkman/candidates/java/8.0.332.fx-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.
- Visit https://www.azul.com/downloads/zulu-community/?architecture=x86-64-bit&package=jdk-fx
- Under Zulu Community Downloads, select:
- Java Version: Java 8 (LTS)
- Operating System: Windows
- Java Package: JDK FX (if not already selected)
- Download the zip distribution and extract the contents to a temporary folder
- Move the extracted folder to something like
C:\Program Files\Zulu\zulu8.46.0.19-ca-fx-jdk8.0.252-win_x64
- In Windows > System Properties > Environment Variables
- 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
) - 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
)
- Append the bin directory of the JDK to the PATH variable (i.e
- (Optional) Open a new console and check that java -version prints something like the following
Code Block |
---|
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/
Info | ||
---|---|---|
| ||
This section needs more info. No one has tried this yet. |
Verify installation by opening a terminal and typing |
Windows
Multiexcerpt | ||
---|---|---|
| ||
Oracle (recommended)Download installer from https://www.oracle.com/java/technologies/downloads/#java17. The x64 MSI installer is the most convenient. Default installation settings are fine. Verify installation. Open a terminal and call Something like the following should be outputted: Aside: java will be installed at the location |
Configuration
Logging
See the IHMC Log Tools README for details on enabling different log levels.
Testing
For testing in IDE, see Unit Testing/wiki/spaces/HOWTO/pages/14288377. For testing with Gradle and on Bamboo, see IHMC CI Gradle plugin and Integrating with Bamboo /wiki/spaces/HOWTO/pages/14288249.
JVM options
Warning |
---|
Needs updating for Java 17. |
Increase Stack Size
Use -Xss4m
for example to set a custom stack size. Default is 512 KB (-Xss512k
)
...
See Java Platform Module System
Learning Resources
- Guide: Learning Java
- The Java™ Tutorials
- Thinking in Java (ISBN 978-0131872486) by Bruce Eckel
...