Skip to main content

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 test systematically with Short Term versions which are obsolete and cannot be downloaded after 18 months but some users regularly confirm that Ancestris works well with all java versions.

 

  • You can install Java from any vendor. Our users find it easier on Adoptium.

 

  • You need a Java Runtime Environment (JRE). The JDK (Java Development Kit) is not required, but since the JDK includes a JRE, a JDK alone is also sufficient.
  • 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 check systematically with Short Term versions which are obsolete and cannot be downloaded after 18 months but some users regularly confirm that Ancestris works well with all java versions.

  • You can install Java from any vendor. Our users find it easier on Adoptium.

  • Install Java

    A simple way to get an official Java version is to get it from Adoptium.net

      Before installing Java, make sure it is not already installed with the instructions below.

      If Java is not installed, just download the latest Java version from the site above. Then install and run Ancestris.

       

      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.

      Multiple Java versions

      If you have multiple versions of Java and would like Ancestris to use another one than the default one, please follow the instructions to force Ancestris to use a specific java version.

       

      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. Just install and launch Ancestris.


        Identify which Java version Ancestris uses

        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 will need to check the Ancestris configuration file.

        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

        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.



        Set the default Java version

        The procedures depend on your operative system.


        Set 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.


        Set 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"


        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="/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:
        • 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.