Skip to main content

Java installation (M)

Ancestris needs Java and is compatible with Java 8 (also called 1.8) and Java 11. We recommend you use Java 8.

If Ancestris does not start, or shows the Ancestris splash screen and stops, it is most generally related to an issue with the Java installation. Either Java is not installed or Ancestris does not find it or finds an incompatible version or finds a corrupted version.

The following sections is a step-by-step check to ensure Ancestris is using a valid Java 8 version.

 

Identify which Java version is set by default

If you don't know if Java is installed or which version is installed, please visit the official detailed explanation page or directly open a terminal and type on the command line

java -version

 

  • If you see an error message, then Java is not installed on your system. Ancestris cannot run. Please follow the Install section below to install java 1.8 and then start Ancestris.

 

  • If you see something like this where Java 1.8 is displayed, it means you have the proper version installed and set by default.
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

According to the display above, we can see that the installed Java version set by default is version 1.8, aka version 8.

If Ancestris does not start, either Ancestris does not find it or finds an incompatible version or finds a corrupted version. Please follow the instructions to identify which Java version Ancestris finds.

 

  • If you see a different Java version from 1.8 or 11, it means you have another Java version by default.
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

According to the display above, we can see that the installed Java version set by default is version 10. Ancestris will not run. Please follow the Install section below to install java 1.8. 

Once done, you will then have several Java versions installed on your system.

If you are happy to set java 1.8 as the default version, please follow the instructions to set the default java version on your system and then start Ancestris.

If you would rather keep the Java version set as it is, then you need to tell Ancestris to not use the default Java version. Please follow the instructions to force Ancestris to use a specific java version and then start Ancestris.

 

Identify which Java version Ancestris finds

To know which Java version Ancestris finds, you will need to check the Ancestris configuration file.

1. Check the line defining default_options

This line should look like this:

default_options="--branding ancestris -J-Xms96m -J-Xmx1g --laf javax.swing.plaf.nimbus.NimbusLookAndFeel"

If one of the options in this line includes --jdkhome="/path/to/java, make sure the path specified in this option is the path to Java version 1.8. Otherwise edit the configuration file and change it. Then lanch Ancestris.

2. Check the line defining jdkhome="/path/to/java"

 

If the line looks like jdkhome="/path/to/java", then make sure the path specified in this option is the path to Java version 1.8. Otherwise edit the configuration file and change it. Then lanch Ancestris.

If the line starts with "#", of if the line does not exist, then it means the line is not used by Ancestris and that Ancestris uses the default Java version set on your system.

If the default version checked above was Java 1.8, it means your installed java 1.8 version might be corrupted. Try reinstalling it using the Install instructions and restart Ancestris.

 

 


Install Java

To install version Java 8 on your system, you can get it from the Oracle's main page, or more precisely, directly from the download page.

  • If you need to know if your device can run Java, go to this configuration page to learn the minimum needed configuration.

 

  • If you want to choose from all the available Oracle Java versions, check this available versions page.
    For MacOS systems, choose the '.dmg' file.

 

  • If you prefer an Open Source Java version, it is possible to use OpenJDK et vous pouvez aussi installer Java à partir de la solution libre AdoptopenJDK..

 

 

Set the default Java version

The procedures depend on your operative system.

 

Set default version for MacOS

  • Check the default active Java version :
java -version

macos_java-vers10.jpg

In this example, we can see Java version 10 is used. We need version 1.8 (i.e. 8) or 11 to run Ancestris.

  • Now check what versions are installed and if version 1.8 or 11 are on the list :
/usr/libexec/java_home -V

macos_java-versused.jpg

OK, we can see here that versions 10 and 1.8 are both installed.

  • Let's add the parameters that make Java version 1.8 the default for your profile :
echo 'export JAVA_HOME=`/usr/libexec/java_home -v 1.8`' >>~/.bash_profile
echo 'export jdkhome==`/usr/libexec/java_home -v 1.8`' >>~/.bash_profile

The first line defines the Java version to use for commands issued on the console (JAVA_HOME, uppercase). The second defines the Java version to use for Ancestris (jdkhome, lowercase).

Here, we defined version 1.8 for both uses (console and Ancestris).

  • Close the terminal and restart it again, this time to check if the changes are correctly applied:
java version

macos_java-vers8.jpg

OK, all fine. We now have version 1.8 as default.

 

Set default version for Windows

You have to create a BAT file per Java version you wish to keep.

Use you favorite text editor to create those files, using the code below, and place them on a folder available from your PATH.

JAVA8.BAT

@echo off
echo Setting JAVA_HOME
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_12
echo setting PATH
set PATH=C:\Program Files\Java\jdk1.8.0_12\bin;%PATH%
echo Display java version
java -version

JAVA11.BAT

@echo off
echo Setting JAVA_HOME
set JAVA_HOME=C:\Program Files\Java\jdk1.11.0_11
echo setting PATH
set PATH=C:\Program Files\Java\jdk1.11.0_11\bin;%PATH%
echo Display java version
java -version

While creating these files, make sure you specify the correct name for the Java files for the lines JAVA_HOME, depending on your Java installation

When you decide to change the Java version, just run the corresponding BAT file: JAVA8 for version 1.8, or JAVA11 for version 11. The Java version at use will be shown on the terminal.

To check if the change is really in effect, type java -version on a console or check this page.

If you wish to keep your latest Java version and force the use of another version 8 of Ancestris, you have to change the configuration file, line jdkhome="C:\path\to\java"

 

 

 

Set default version for Linux

Type the following on a console :

sudo update-alternatives --config java

 

en_linux-java-versions.png

Select from the list the version needed.

If you wish to keep your latest Java version and force the use of another version of Java for Ancestris, you have to change the configuration file, line jdkhome="/path/to/java"

To get help using this tool :

sudo update-alternatives -l

 

 

Force Ancestris to use a specific Java  version

Whatever your operating system is, if the default active Java version is different from the one to be used with Ancestris, you have to modify Ancestris's configuration file like this:

#jdkhome=jdkhome="/path/to/java"