Skip to main content

Java installatie

Ancestris heeft Java nodig en is compatible met Java 8 (ook genoemd 1.8) en Java 11. We bevelen aan dat je Java 8 gebruikt.

Als Ancestris niet wil starten, of je ziet het Ancestris fout scherm en het stopt, meestal is dit een probleem met de Java installatie. Of Java is niet geïnstalleerd, of Ancestris kan kan Java niet vinden, of het vindt een niet compatible versie, of het vindt een beschadigde Java versie.

Het volgende gedeelte biedt een stap-voor-stap controle om zeker te zijn dat Ancestris een geldige versie 8 van Java gebruikt.

Algemene principes

  • Je hebt een Java Runtime Enviiremont (JRE) nodig. De JDK (Java Development Kit) is niet vereist, maar omdat de JDK tegenwoordig ook een JRE bevat is alleen een JDK voldoende.
  • Ancestris werkt met Java versies 8 en hoger. Het is ontwikkeld in versie 8 of hoger voor een betere samenwerking met de meeste gebruikers. Het is ook getest en het werkt ook met met Java 11 en Java 14, dat zijn LTS (Long Term Support) versies. We controleren niet de Short Term versies, die eindig zijn en niet meer gedownload kunnen worden na 18 maanden.
  • Je kan een JRE ook van een andere leverancier gebruiken: Oracle, OpenJdk of AdoptOpenJdk of één die je zelf hebt samengesteld.
  • De Oracle JRE installatie wordt door alle systemen en programma's herkend.
    • Alleen de Oracle versie wordt direct herkend door de programma's en heeft geen extra installatie of configuratie nodig. 
    • Als je de Oracle versie installeert, heeft alleen JRE 8 geen Oracle  registratie nodig.
    • Op Windows, dan is er niet alleen een JAVA_HOME variabele of de PATH variabele, maar er is ook een registratie sleutel nodig.
  • Als je opteert voor een gratis installatie, zal je Ancestris moeten vertellen waar deze installatie staat. In dat geval, zoals hieronder beschreven, wis de jdkhome regel in het ancestis.conf configuratie bestand dat staat in de "etc" map van je Ancestris installatie en zet je hier het juiste pad neer.

Uitzoeken welke Java versie standaard wordt gebruikt

Als je niet weet of Java of welke versie is geinstalleerd, ga dan naar de  official detailed explanation page of open een commando terminal en type op de commando regel:

java -version

Er zijn verschillende methoden voor MacOS en Windows.
   - voor MacOS systems,systemen, controleer de stap-voor-stap instructies.
   - voor Windows systems,systemen, controleer de stap-voor-stap instructies.

  • Als je een foutboodschap krijgt te zien in het commando scherm dan is Java niet op je systeem geïnstalleerd. Ancestris start dan niet. Volg de onderstaande installeer handleiding  om Java 1.8 alsnog te installeren en Ancestris te starten.
  • Als je iets ziet wat op onderstaand lijkt waar Java 1.8 is geïnstalleerd. betekent dat er een juiste versie is geïnstalleerd en als standaard wordt gebruikt.
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)

Zoals je in het bovenstaande scherm kan zien is dat standaard Java 1.8, aka versie 8 is geïnstalleerd. 

Als Ancestris niet wil starten dan, of Ancestris kan Java niet vinden, of vindt een niet bruikbare versie, of vindt een beschadigde versie. Volg dan de instructies om te bepalen welke versie van Java Ancestris heeft gevonden.

  • Als je een andere versie van Java vindt dan 1,8 of 11 betekent dat dat je standaard een andere versie gebruikt.
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)

Volgens bovenstaand scherm zie je dat de geïnstalleerde Java standaard versie 10 is. Ancestris zal niet starten. Ga naar de onderstaande installatie handleiding om Java 8 te installeren.

Wanneer je dit gedaan hebt zal je verschillende versies van Java op je systeem geïnstalleerd hebben.

Als je tevreden bent om Java versie 8 als standaard versie te gebruiken, volg de volgende instructies om java 8 als standaard op jouw systeem te installeren en en Ancestris te starten.

Als je echter de Java versie die je hebt te gebruiken, dan moet je Ancestris vertellen om niet de standaard versie Java te gebruiken. Volg dan de instructies om Ancestris een andere specifieke Java versie te gebruiken en dan Ancestris te starten.

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 launch Ancestris.

If this line does not include a java path, follow the instructions below.

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 Java version 8. Otherwise, edit the configuration file and change it. Then launch Ancestris.

If the line starts with "#", or 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 8, it means your installed Java 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 prefer an Open Source Java version, it is possible to use OpenJDK and you can also install Java from the free AdoptopenJDK solution.

 

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"

Reversely, if this line is not commented out, that is if it does not start with the "#" character, Ancestris will take it into account first and the path indicated to the Java version must exist and correspond to a functional version of Java. Otherwise Ancestris will not look for other locations for a better Java version and Ancestris will not start.