Open main menu

TaticView β

Changes

Java JRE install and troubleshooting

1,744 bytes added, 14:52, 5 October 2022
no edit summary
<translate>
 
<div style="float: right;">__TOC__</div>
= JAVA JRE install and troubleshooting = <!--T:1-->
<!--T:2-->
O The [[TVCli]] (utilitário de linha de comando do TaticViewcommand line utility), necessita que a estação/servidor tenha o needs JAVA disponível para sua execuçãoto be available in station where it will be executed.
<!--T:3-->
A versão mínima necessária é a versão The minor JAVA version supported is 8u101.
<!--T:4-->
Como boa práticaAs good practice, recomendamos sempre ter a atualização mais recente da versão we recommend you maintain the JAVA installed updated to last updates available for version 8 instalada, por que estas atualizações trazem várias correções de segurançabecause they include security corrections.
<!--T:5-->
Podem ser usados os dois empacotamentos disponíveis, tanto o You can use either JRE quanto o or JDKpackages.
== Obtendo uma versão atualizada do Getting a updated JAVA version == <!--T:6-->
<!--T:7-->
Como o JAVA é uma linguagem is an open sourcelanguage, existem vários locais onde podemos obtê-laand therefore there are a lot of different sites, alguns destes inclusive exigem uma assinatura anual para poder usá-la comercialmentesome of them you may need to pay a subscription to use it on business applications.
<!--T:8-->
Por isso é importante ler os termos de usoSo, it's very important to read the license before use it.
<!--T:9-->
Sugerimos usar We suggest you to use a compilação mantida pela build maintained by [https://www.eclipse.org/org Eclipse Foundation], que tem boa qualidade, é mantida e atualizada, e é livre, por tantowitch maintain a good quality and updates security patches, não tem problemas de licenciamentoand it's free for business use.
<!--T:10-->
O The JAVA mantido pela maintained by [https://www.eclipse.org/org Eclipse Foundation] chama-se is the [https://adoptium.net/about.html Adoptium].
<!--T:11-->
Portanto, [[File:Filesave.png]][https://adoptium.net/ baixe o DOWNLOAD JAVA versão 8 atualizadaupdated version] da from Eclipse Foundation.
<!--T:12-->
A instalação é simplesAnd install it, basta seguir o it's very simple using the install wizard.
== Instalador do TVCli não encontrou o installer didn't found JAVA ?== <!--T:13-->
<!--T:14-->
É possível que mesmo com o It is possible the even with JAVA presente (instalado) na estação/servidor o instalador do installed on the station, the TVCli não consiga detectá-loinstaller can't find it.
<!--T:15-->
O Instalador ''procura'' a pasta onde o The installer search the folder where JAVA está instaladois installed, em duas by reading two [https://pten.wikipedia.org/wiki/Vari%C3%A1vel_de_ambiente variáveis de ambienteEnvironment_variable environment variables]: * No At ''JAVA_HOME'' environment variable * At Windows [https://en.wikipedia.org/wiki/PATH_(variable)#DOS,_OS/2,_and_Windows ''PATH'' do sistema operacional] * Na variável de ambiente In cases where JAVA isn''JAVA_HOME''Caso o JAVA não esteja mapeado em nenhuma destas variáveis o instalador aborta a instalação e mostra a seguinte telat mapped in any of these variables, the installer aborts the installation and shows the following screen.
<!--T:16-->
<!--T:17-->
A seguirNext, vamos ajudá-lo a configurar a variável de ambiente we'll help you set the ''PATH'' para solucionar este problemaenvironment variable to solve this problem.
=== Configurando o Configuring Windows ''PATH'' no Windows === <!--T:18-->
<!--T:19-->
O primeiro passo é localizar a pasta onde o The first step is to locate the folder where JAVA está instalado na estaçãois installed on the workstation. Isso pode ser feito procurando por This can be done by looking for ''java.exe'' nas pastas da máquinain the machine's folders, caso vc tenha mais de um if you have more than one JAVA na estação o on the workstation, the ideal é usar a atualização mais recente da o da versão is to use the latest update from version 8.
<!--T:20-->
O segundo passo é configurar a varável de ambinte, para que ela The second step is to configure the environment variable so that it ''apontepoints'' para o diretório localizado no primeiro passoto the directory located in the first step.# No From the Windows Start menu Iniciar do Windows, clique em Painel de Controleclick Control Panel.# No Painel de ControleIn Control Panel, clique duas vezes em Sistemadouble-click System.# Na caixa de diálogo Propriedades do SistemaIn the System Properties dialog, clique na guia Avançado e clique em Variáveis de Ambienteclick the Advanced tab and click Environment Variables.# Na caixa de diálogo Variáveis de AmbienteIn the Environment Variables dialog, no quadro Variáveis do sistemain the System Variables frame, selecione a entrada select the ''Path''entry.# Edit button# Check if there is already an entry pointing to some old JAVA directory, if so, remove it.# New button# Enter the path to the JAVA ''bin'' directory (where the ''java.exe'' file is)# OK button# Rerun the installer == Error UnsupportedClassVersionError when running TVCli == <!--T:25--> <!--T:26-->The '''UnsupportedClassVersionError''' happens because the Java version in use isn't correct.
<!--T:27-->
Bellow a complete sample of the error output
<pre>
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/sadig/taticview/cli/Main : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
</pre>
The Java used during TVCli execution is indicated by Windows [https://en.wikipedia.org/wiki/PATH_(variable)#DOS,_OS/2,_and_Windows ''PATH''] variable.
<!--T:2128-->On To determine witch version of Java is pointed by PATH variable you can use the Start menuJAVA ''-version'' parameter, click Control Panelwe will show you bellow. In Control Panel, double-click System# Open [https://en. In the System Properties dialog box, click the Advanced tab, and then click Environment Variableswikipedia.org/wiki/Windows_Console Windows Command Console] In the Environment Variables dialog box, in the System variables frame, select the # Execute java asking for his version: '''''java -version'''Path'' entry.
<!--T:29-->
The ''-version'' parameter should output something like bellow for Java version 8
<pre>
C:\>java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.282-b08, mixed mode)
</pre>
<!--T:2230--># Botão Editar# Verifique se já existe uma entrada apontando para algum diretório antigo do JAVA, se sim, remova.# Botão Novo# Digite o caminho para diretório BIN do JAVA (onde está o arquivo If Java version is bellow 8 the ''java.exeUnsupportedClassVersionError'')is thrown. You need to install a newer version, or if a newer version is already installed, you need to [[# Botão OK# Reexecute o instaladorConfiguring_Windows_PATH|correct de Windows PATH]] variable to point to newest Java.
== Mais dúvidas More doubts ? == <!--T:23-->
<!--T:24-->
Caso ainda tenha dúvidas fale com nosso If you still have questions, talk to us through [https://support.taticview.com/ Suportesupport], podemos lhe ajudar no que for necessáriowe can help you with whatever you need
</translate>