User Tools

Site Tools


documentation:java_8_installation_page

Java 8 installation

fc-21.12.2022

Capsis needs Java 8 (also known as 1.8) to be installed on your machine (Windows, Linux or MacOSX). There are several Java 8 versions available, they are all more or less equivalent, see the various options below and choose one.

Notes:

  • To check your current java installation, open a new Terminal and see the first section below.
  • Any build of Java 8 is ok for Capsis, e.g. 1.8.0_101, 1.8.0_261
  • Capsis will not accept any other version of Java (Java 7, Java 11, Java 17…).
  • A Java Runtime Environment (JRE) is enough to run Capsis (Capsis end-users)
  • A Java Development Kit (JDK) is needed to develop in Java in Capsis (Capsis modellers)

Installation procedure

Check if Java 8 is already the default version on your machine

There is a simple way to check if Java is installed on your machine and which version, this needs to open a Terminal and type a command in it.

For help with the Terminal, see theses sections in the FAQ for Windows, Linux and MacOSX.

To check which Java is installed to run Capsis, type the following command in your terminal:

java -version

If java is not found or if it is not version 8, see the Java 8 installation section.

If you are a Capsis modellers, to develop in Capsis, you also need a Java compiler, you can check if it is available by typing this command in the terminal:

javac -version

If javac is not found or if it is not version 8, Java 8 installation section.

An example of checking how java and javac are installed under a Linux terminal:

coligny@marvin-13:~$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

coligny@marvin-13:~$ javac -version
javac 1.8.0_101

coligny@marvin-13:~$ 

Both commands answer Java 1.8, Java 8 installation is correct, you may leave this page.

Download and install a Java 8 version

There are several possible options to get Java 8 (with or without registration needed), choose one and you will have to select these options:

  • Operating System: Windows, Linux or MacOSX (new Apple M1 processors = AArch64 = ARM64)
  • Architecture: x64 (64 bits, modern machines) or x86 (32 bits, old machines, less memory at runtime)
  • Package type: JRE (enough to run Capsis) or JDK (brings the Java compiler, needed to develop in Capsis)
  • Version: 8 (same than 1.8)
  • If asked, HotSpot or OpenJ9 options are both Ok

OpenJDK 8 from Adoptium (also named Eclipse Temurin) (no registration, Windows, Linux and MacOSX available)

  • Example for Windows / 64 bits:
  • Select and download OpenJDK8U-jdk_x64_windows_hotspot_8u352b08.msi
  • Install it on your machine

IBM Semeru Open Edition JDK 8 from the IBM page (no registration, Windows, Linux and MacOSX available)

  • Example for Linux / 64 bits:
  • Select and download ibm-semeru-open-jdk_x64_linux_8u352b08_openj9-0.35.0.tar.gz
  • Unzip it in some Applications/ directory

Oracle JDK 8 from the Oracle page or from the Oracle java 1.8 download archives (needs registration, Windows, Linux and MacOSX available)

  • Example for MacOSX / 64 bits:
  • Create an Oracle account then login
  • Select and download jdk-8u351-macosx-x64.dmg
  • Install it on your machine

After installation, you must tell your operating system to use this version.

Tell your operating system to use the Java 8 version

Several versions of Java may be installed on your computer, but one only is the default version for your Operating System. There may be several ways to specify this default version is Java 8, here we propose to adapt the PATH environment variable.

The bin/ folder containing java (and javac if you installed a JDK) must be added at the top of the list of folders in the PATH environment variable.

On Windows

  • From the Windows Control Panel, open the System configuration panel (E.g. Click Start > Settings > Control Panel > System)
  • In the System configuration panel, choose Advanced > Environment Variables
  • In the PATH system variable (not in PATH user variable), add the location of the bin/ folder of the installed JDK in first position (you may search this directory in a file manager and copy / paste the path). Example folder: C:\Program Files\Java\jdk1.8.0_261\bin
  • Do not forget bin\ at the end

On Linux

  • The path to the location of the bin/ folder of the installed JDK must be added in first position of the PATH variable. All folder names in the PATH variable must be separated by a ':'.
  • Do not forget bin/ at the end
  • Example of /etc/environment after such an update:

Setting jdk1.8.0_261 as the default Java in /etc/environment

On MacOSX

Note: this procedure for MacOSX must be checked

  • Here, we will adapt the JAVA_HOME system variable instead of the PATH
  • Open a Terminal and check which versions of Java are available
$ cd /usr/libexec

$ ./java_home -V
14.0.1 (x86_64) "Oracle Corporation" - "Java SE 14.0.1" /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home
1.8.202.08 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
  • Change the system default Java version to Java 8 by editing ~/.bash_profile
$ cat ~/.bash_profile
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`

For all systems

To check your new java configuration, open a new Terminal (it will see the configuration changes) and see the first section.

documentation/java_8_installation_page.txt · Last modified: 2024/05/07 13:33 by coligny