Skip to main content

Instalação JAVA

O Ancestris precisa de Java e é compatível com Java 8 (também chamado de 1.8) e Java 11. Recomendamos que você use Java 8.

Se o Ancestris não iniciar, ou mostrar a tela inicial do Ancestris e parar, geralmente está relacionado a um problema com a instalação do Java. O Java não está instalado ou o Ancestris não o encontra, encontra uma versão incompatível ou encontra uma versão corrompida.

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

 

Identifique qual versão do Java está configurada por padrão

Se você não souber se o Java está instalado ou qual versão está instalada, visite a página de explicação detalhada oficial ou abra diretamente um terminal de linha de comando e digite na linha de comando:

java -version

Existem métodos alternativos para MacOS e Windows.
- para sistemas MacOS, verifique as instruções passo a passo.
- para sistemas Windows, verifique as instruções passo a passo.

 

  • Se você vir uma mensagem de erro no terminal, o Java não está instalado no seu sistema. Ancestris não pode ser executado. Siga a seção Instalar abaixo para instalar o Java 1.8 e, em seguida, inicie o Ancestris.

 

  • Se você vir algo assim em que o Java 1.8 é exibido, significa que você tem a versão correta instalada e definida por padrão.
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 acordo com a exibição acima, podemos ver que a versão Java instalada definida por padrão é a versão 1.8, também conhecida como versão 8.

Se o Ancestris não iniciar, o Ancestris não o encontra, encontra uma versão incompatível ou encontra uma versão corrompida. Siga as instruções para identificar qual versão Java o Ancestris encontra.

 

  • Se você vir uma versão Java diferente da 1.8 ou 11, significa que você tem outra versão Java por padrão.
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)

De acordo com a exibição acima, podemos ver que a versão Java instalada definida por padrão é a versão 10. O Ancestris não será executado. Siga a seção Instalar abaixo para instalar o Java 8.

Depois de concluído, você terá várias versões Java instaladas no seu sistema.

Se você deseja definir o Java 8 como a versão padrão, siga as instruções para definir a versão java padrão no seu sistema e inicie o Ancestris.

Se você preferir manter a versão Java definida, é necessário dizer ao Ancestris para não usar a versão Java padrão. Siga as instruções para forçar o Ancestris a usar uma versão java específica e, em seguida, inicie o Ancestris.

 

IdentifyIdentifique whichqual versão Java versiono Ancestris findsencontra

ToPara knowsaber whichqual versão Java versiono Ancestris finds,encontra, youvocê willprecisará needverificar to check the Ancestriso configurationarquivo filede configuração. do Ancestris.

1. CheckVerifique thea linelinha definingque define default_options

ThisEsta linelinha shoulddeve lookficar like this:assim:

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

IfSe oneuma ofdas theopções optionsnesta inlinha this line includesincluir --jdkhome="/path/to/java, makeverifique surese theo pathcaminho specifiedespecificado innesta thisopção optioné iso thecaminho pathpara too Java versionversão 1.8. Otherwise,Caso editcontrário, theedite configurationo filearquivo andde changeconfiguração it.e Thenaltere-o. launchEntão inicie o Ancestris.

IfSe thisesta linelinha doesnão notincluir includeum acaminho javajava, path,siga followas theinstruções instructions below.abaixo.

2. CheckVerifique thea linelinha definingque define jdkhome

IfSe thea linelinha looks likeparecer jdkhome="/path/to/java", thenverifique makese sureo thecaminho pathespecificado specifiednesta inopção thisé optiono iscaminho thepara path too Java versionversão 8. Otherwise,Caso editcontrário, theedite configurationo filearquivo andde changeconfiguração it.e Thenaltere-o. launchEntão inicie o Ancestris.

IfSe thea linelinha startscomeçar withcom "#", orou ifse thea linelinha doesnão notexistir, exist,significa thenque ita meanslinha thenão lineé isusada not used bypelo Ancestris ande thatque o Ancestris usesusa thea defaultversão Java versionpadrão setdefinida onno yourseu system.sistema.

IfSe thea defaultversão versionpadrão checkedverificada aboveacima wasfor Java 8, itsignifica meansque youra installedversão instalada do Java 8 versionpode mightestar becorrompida. corrupted.Tente Tryreinstalá-lo reinstallingusando it using theas Installinstruções instructionsde instalação ande restartreinicie o 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, 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

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"