Java installation
Ancestris needs Java and is compatible with Java versions 8 to 21.
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 offer a step-by-step check to ensure Ancestris is using a valid Java version.
General principle
- Ancestris works with all Java versions listed at the top of this page.
- Ancestris is compiled with version 8 for better compatibility with most users.
- Ancestris has been tested with several versions which are LTS (Long Term Support) versions.
- We do not systematically test Ancestris with Short Term versions. They are quickly obsolete and cannot be downloaded after 18 months but some users regularly confirm that Ancestris works well with all java versions.
- If a functioning version of Java is available on your system, Ancestris will find it without having to configure anything.
- Otherwise, you can install Java from any vendor. Our users find it easier to download it from Adoptium.
- To know whether Java is installed on your system, follow these instructions.
- In case Ancestris does not start although Java is installed, please check the Troubleshooting section.
- You can have multiple versions of Java installed on your system. To tell Ancestris which one to use, you will need to
- either update the Ancestris configuration file. For this, follow these instructions.
- or change the default Java version. For this, follow these instructions.
- either update the Ancestris configuration file. For this, follow these instructions.
Install Java
A simple way to get an official Java version is to get it from Adoptium.net
If Java is not installed or if you want the latest or a specific version of Java, just download it from the site above.
Identify if Java is already installed
If you don't know if Java is installed or which version is installed, open a command line terminal and type the command line:
java -version
- If you see an error message in the terminal, then Java is not installed on your system. Ancestris cannot run. Please follow the Install section below to install Java.
- If you see something like this below where Java version is displayed, it means Java is installed with the indicated version. You may have several versions installed, but this one is the one Ancestris will find, unless you configured Ancestris to do differently.
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 you have a Java version installed as per the example above, and are happy to use this version, you may disregard the rest of this page.
Troubleshooting
If Java is installed and Ancestris does not start, either Ancestris does not find Java or finds an incompatible version or finds a corrupted version.
IfWhether youonly wish to keep your latest Java version and force the use of anotherone version of Java foror Ancestris,several versions are installed on your system, you havewill then need to changecheck and potentially update the Ancestris configuration file to tell Ancestris where to look for Java.
- than changing the Ancestris configuration file, and if several version of Java are available on your system, an alternative would be to change the default Java version. The default Java version is the one appearing when you type
java -version
like indicated in the section above. This is the one Ancestris will use if an Ancestris configuration file does notfindexistJavaor?doesPleasenotfollowinclude theinstructionsinstruction of where toidentifyfindwhich Java version Ancestris uses. An incompatible or incorrect Java version ?Install another one as the default one. Pleasefollow the instructions to set the default java versionon your system.
Rather
Java.
IdentifyUpdate which Java versionthe Ancestris usesconfiguration file
You only need to worry about what is detailed below if Java is installed and Ancestris does not start.
To identify the problem, first check if Ancestris finds the Java version you want. To know which Java version Ancestris finds, you willYou need to checkupdate the Ancestris configuration file. to tell where Ancestris should look for Java.
The principle is the following:
- If a configuration file exists which includes a jdkhome parameter indicating where to find java, Ancestris will use the corresponding java version
- Otherwise Ancestris will use the default Java version indicated in the section above
Ancestris uses two configuration files, both named ancestris.conf
1/ The first one is part of the Application and it is created during the installation of Ancestris
2/ The other one is part of your user directory, and created when you change some Preferences when using Ancestris.
So open the configuration file with a regular text editor.
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 the Java version you want to use.
If this line does not include a java path, locate jdkhome elsewhere.
2. Check the line defining jdkhome
If the line looks like jdkhome="/path/to/java"
, then make sure the path specified in this option is the path to the Java version you want to use.
If the line starts with "#", a comment markup, Ancestris will disregard as if it did not exist.
If Ancestris does not start, it could be that the jdkhome folder name is incorrectly spelt or points to an incorrect Java version.
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'sthe configurationjdkhome fileline like this:
jdkhome="/path/to/java"
Case of Windows and Linux
For Windows or Linux for example, if the java executable is /usr/java/jdk1.8.0_291-amd64/bin/java, then you must indicate
jdkhome="/usr/java/jdk1.8.0_291-amd64/"
Note: you have to exclude /bin/java in the path description.
Case of MacOS
For MacOS, if for example Java 18 and Java 17 are installed on your Mac and you want to force the use of Java 17 for Ancestris, the complete manipulation to force the version of Java would be the following:
-
Edit the Ancestris application configuration file
/Applications/Ancestris.app/Contents/Resources/ancestris/etc/ancestris.conf
-
Look for the line
#jdkhome="/chemin/vers/java"
and suppress the starting character # in order to uncomment the line so that Ancestris takes it into account. - Replace the value to the Java path you want to use, for instance temurin-17 here, so that the line reads:
jdkhome="/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home"
- Save the modified ancestris.conf file and check that it has been saved correctly.
- Restart Ancestris.
Points of attention whatever your operating system
Warning 1 : If the java directory does not exist, in this case temurin-17.jdk in the previous example, then Ancestris will not launch because it will not find Java.
Warning 2: If the jdkhome line is also defined in the personalized Ancestris configuration file, its value will take priority over that of the application configuration file. See the corresponding Ancestris configuration file page.
Change the default Java versions in case multiple versions are installed
TheIf proceduresseveral dependversions are available on your systems and you need to swap Java versions so that Ancestris uses the default one, the swap procedure depends on your operative system.
SetSwap default version for MacOS
The version of Java running on your system may be incompatible with Ancestris, so it will not run.
If you want to keep your current Java version and, for instance, run Java Version 8 (aka 1.8) at the same time, you need to swap Java versions.
To swap between different Java versions, open a Terminal window and follow the steps below.
In the following example, the instructions let you set Version 8 (aka 1.8) by default, without removing Java Version 10:
1/6 - Check which version of Java is set by default
java -version
echo $jdkhome
You can see the java version you are running.
2/6 - Get a list of all installed versions on your system and check Version 8 or 11 is among them
/usr/libexec/java_home -V
If the version you want is not in the list, then install it as explained in this section.
If it is in the list, but not the one you had above, force the path to the java version with the following step.
3/6 - Type in the following 2 lines in the Terminal
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
These two lines will add the command to set your default Java version in your personal profile. Here, we force version 1.8 (or 8). Replace with your java version.
The first line defines the default Java version for all programs (JAVA_HOME, in uppercase).
The second line defines the default Java version to use for Ancestris (jdkhome, lowercase).
4/6 - Close the Terminal
exit
5/6 - Reopen a Terminal and check that the running Java is now the one you want (version 8 in our example)
java -version
echo $jdkhome
You can now start Ancestris.
6/6 - Start Ancestris
When Ancestris starts, a Terminal window opens at the same time.
You can see in the title bar that version 8 of Java is being used by Ancestris.
SetSwap default version for Windows
You have to create a BAT file per Java version you wish to keep.
Use your favourite text editor to create those files, using the code below, and place them in 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 of Java for Ancestris, you have to change the configuration file, line jdkhome="C:\path\to\java"
SetSwap default version for Linux
Type the following on a console :
sudo update-alternatives --config java
Select from the list the version needed.
To get help using this tool :
sudo update-alternatives -l