Skip to main content

Instalación de Java (STL)

Ancestris necesita Java y es compatible con Java 8 (también llamado 1.8) y Java 11. Le recomendamos que utilice Java 8.

Si Ancestris no se inicia o muestra la pantalla de bienvenida de Ancestris y se detiene, generalmente está relacionada con un problema con la instalación de Java. Java no está instalado o Ancestris no lo encuentra o encuentra una versión incompatible o encuentra una versión dañada.

Las secciones siguientes ofrecen una comprobación paso a paso para asegurarse que Ancestris está utilizando una versión válida de Java 8.

 

Identifique qué versión de Java está establecida de forma predeterminada

Si no sabe si Java está instalado o qué versión está instalada, visite: la página oficial de explicación detallada o abra directamente un terminal de línea de comandos y escriba en la línea de comandos:

java -version

Existen métodos alternativos para MacOS y Windows.
   - para sistema MacOS, check the step-by-step instructions.
   - para sistema Windows, check the step-by-step instructions.

 

  • Si ve un mensaje de error en el terminal, Java no está instalado en su sistema. Ancestris no puede continuar.   Siga la sección instalar a continuación para instalar Java 1.8 y luego inicie Ancestris.

 

  • Si ve algo como esto donde se muestra Java 1.8, significa que tiene la versión adecuada instalada y establecida de forma predeterminada.
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)

De acuerdo con la pantalla anterior, podemos ver que la versión de Java instalada establecida por defecto es la versión 1.8, también conocida como versión 8.

Si Ancestris no se inicia, Ancestris no lo encuentra o encuentra una versión incompatible o encuentra una versión dañada. Siga las instrucciones para identificar que versión de Java encuentra Ancestris.

  • Si ve una versión de Java diferente de 1.8 u 11, significa que tiene otra versión de Java de forma predeterminada.
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)

Si Ancestris no se inicia, Ancestris no lo encuentra o encuentra una versión incompatible o encuentra una versión dañada. Siga las instrucciones para identificar qué versión de Java encuentra Ancestris. Siga la sección instalar a continuación  para instalar Java 8.

Una vez hecho esto, tendrá varias versiones de Java instaladas en su sistema.

Si está dispuesto a establecer Java 8 como la versión predeterminada, siga las instrucciones para establecer  la versión Java predeterminada en su sistema y, a continuación, inicie Ancestris.


Si prefiere mantener la versión Java establecida tal cual, entonces debe decirle a Ancestris que no utilice la versión predeterminada de Java. Siga las instrucciones para forzar a Ancestris a utilizar una versión específica de Java  y luego iniciar Ancestris

 

Identifique qué versión de Java encuentra Ancestris

Para saber qué versión de Java encuentra Ancestris, deberá comprobar el archivo de configuración de Ancestris

1.Compruebe la definición de la línea default_options

Esta línea debería tener este aspecto:

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

Si una de las opciones de esta línea incluye --jdkhome="/path/to/java, asegúrese que la ruta especificada en esta opción es la ruta de acceso a Java versión 1.8. De lo contrario, edite el archivo de configuración y cámbielo. Luego inicie Ancestris.

Si esta línea no incluye una ruta Java, siga las instrucciones que se indican a continuación.

2. Compruebe la definición de la línea jdkhome

Si la línea se ve como jdkhome="/path/to/java", a continuación, asegúrese que la ruta especificada en esta opción es la ruta de acceso a Java versión 8. De lo contrario, edite el archivo de configuración y cámbielo. Luego inicie 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. You will get a message like the following in a terminal when Ancestris starts.

Swap 01.png

If you want to keep your current Java version and run say 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

Swap 02.png

We can see Version 10. Ancestris will not work. You need Version 8 (aka 1.8) for Ancestris.

2/6 - Get a list of all installed versions on your system and check Version 8 (aka 1.8) is among them

/usr/libexec/java_home -V

Swap 03.png

OK, we can see Version 8 (aka 1.8) is installed.
If it were not, then install it as explained in this section.

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.

Swap 04.png

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 Version 8 (aka 1.8)

java -version
echo $jdkhome

Swap 05.png

OK, it is. We can see Version 8 (aka 1.8). You can now start Ancestris.

6/6 - Start Ancestris

Swap 06.png

When Ancestris starts, a Terminal window opens at the same time.

You can see in the title bar that Version 8 (aka 1.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"