Source:Installing and Managing Java: Difference between revisions

From SEPsesam
(In progress.)
Line 26: Line 26:
Java is required on all systems that serve as [[Special:MyLanguage/SEP_sesam_Glossary#SEP_sesam_Server|SEP sesam Server]], [[Special:MyLanguage/SEP_sesam_Glossary#GUI|SEP sesam GUI client]] or [[Special:MyLanguage/SEP_sesam_Glossary#RDS|SEP sesam Remote Device Server (RDS)]] when [[Special:MyLanguage/SEP_sesam_Glossary#SEP Si3 deduplication store|Si3 deduplication]] is used. Java is not required for [[Special:MyLanguage/SEP_sesam_Glossary#SBC|SEP sesam Client]] (does not provide GUI) or for SEP sesam RDS if Si3 deduplication is not used.
Java is required on all systems that serve as [[Special:MyLanguage/SEP_sesam_Glossary#SEP_sesam_Server|SEP sesam Server]], [[Special:MyLanguage/SEP_sesam_Glossary#GUI|SEP sesam GUI client]] or [[Special:MyLanguage/SEP_sesam_Glossary#RDS|SEP sesam Remote Device Server (RDS)]] when [[Special:MyLanguage/SEP_sesam_Glossary#SEP Si3 deduplication store|Si3 deduplication]] is used. Java is not required for [[Special:MyLanguage/SEP_sesam_Glossary#SBC|SEP sesam Client]] (does not provide GUI) or for SEP sesam RDS if Si3 deduplication is not used.


The two main implementations of Java are ''OpenJDK'' and ''Oracle Java''. As the differences between them are not that significant from the SEP sesam point of view and with [https://www.oracle.com/technetwork/java/java-se-support-roadmap.html Oracle announcing] the end of free support for past versions of Java as well as the Oracle JDK binary no longer be free for use in production from JDK 11 on, SEP sesam introduced support for ''OpenJDK'' LTS (long term support) distributions that are available free of charge. Note that [[Special:MyLanguage/4_4_3_Beefalo:HiDPI_Display_Support|''HiDPI displays'']] are supported with the relevant Java version.
The two main implementations of Java are ''OpenJDK'' and ''Oracle Java''. As the differences between them are not that significant from the SEP sesam point of view and with [https://www.oracle.com/technetwork/java/java-se-support-roadmap.html Oracle announcing] the end of free support for past versions of Java as well as the Oracle JDK binary no longer be free for use in production from JDK 11 on, SEP sesam introduced support for ''OpenJDK'' LTS (long term support) distributions that are available free of charge. Note that [[Special:MyLanguage/4_4_3_Beefalo:HiDPI_Display_Support|''HiDPI displays'']] are supported with the relevant Java version.


===Prerequisites===
===Prerequisites===
*On Windows, you may need ''Administrator'' privileges to install Java.
*On Windows, you may need ''Administrator'' privileges to install Java. Make sure to install Java from the provided [http://www.sepsoftware.com/java11 Java download] link before you install [[Special:MyLanguage/4_4_3:SEP_sesam_Quick_Install_Guide#windows|SEP sesam packages]].
*On Linux, all commands have to be executed as a ''root'' user or as an administrative user with the ''sudo'' command prefixed. Make sure to install Java before you install [[Special:MyLanguage/4_4_3:SEP_sesam_Quick_Install_Guide#Linux|SEP sesam packages]].
*On Linux, all commands have to be executed as a ''root'' user or as an administrative user with the ''sudo'' command prefixed.  
*It is recommended to disable your firewall before starting installation.  
*It is recommended to disable your firewall before starting the installation.
*Make sure that system requirements for installing Java are met.
*If you already have Java installed and you want to use multiple Java versions, make sure to configure the required version as explained in the section [[4_4_3_Beefalo:Installing_and_Managing_Java#configuring|Configuring Java]]. If you do not need multiple Java versions, remove the Java installations not required by SEP sesam.
*If you already have Java installed and you want to use multiple Java versions, make sure to configure the required version as explained in the section [[4_4_3_Beefalo:Installing_and_Managing_Java#configuring|Configuring Java]]. If you do not need multiple Java versions, remove the Java installations not required by SEP sesam.


The following procedure shows how to install OpenJDK on Windows and Linux.
The following procedures show how to install different Java versions on Windows and Linux. SEP sesam recommends installing the SEP sesam Java distribution as described in the following section.  


=={{anchor|install_openjdk}}Installing Java==
=={{anchor|sesam_java}}Installing SEP sesam Java distribution==
How you install Java depends on the operating system as well as on the version you intend to install; you can install OpenJDK or Oracle Java. After installing the required Java version, you may have to enable and configure it.
How you install Java depends on the operating system as well as on the version you intend to install; you can install OpenJDK or Oracle Java. After installing the required Java version, you may have to enable and configure it.
*Windows download and installation of Oracle Java is easy and pretty straightforward: Download the [http://www.sepsoftware.com/java11 Java] recommended by SEP sesam directly from the provided link, then run the installer – and you are set.
 
*Linux download and installation of Oracle Java depend on the type of installation packages: either it is an archive binary file (.tar.gz) or an RPM binary file (.rpm) for Linux platforms, such as Red Hat and SuSE. Ensure that your Java installation type (.tar.gz or .rpm) matches SEP sesam installation package; if the SEP sesam Server is going to be installed as an .rpm package, Java must also be installed as .rpm. 
===Windows===
#Download the required [https://www.oracle.com/technetwork/java/javase/downloads/index.html Oracle Java JDK rpm binary package].
Windows download and installation of ''OpenJDK'' is easy and pretty straightforward if you use the SEP sesam ''Java download'': Download the [http://www.sepsoftware.com/java11 Java] directly from the provided link, then run the installer – and you are set. Note that you need to specify the Java path during the installation of SEP sesam.
#Install Java using the rpm command. Make sure you change the version number appropriately
 
rpm -ivh jdk-<span style="color:darkred"><version></span>.rpm
===Linux===
As of SEP sesam 4.4.3 Beefalo, SEP sesam for Linux already includes the ''OpenJDK'', thus no additional steps are required. However, if you opt for another Java version download then you have to download and install Java following the instructions offered by your Java provider.
For example, to install Oracle Java JDK 11 (LTS):
rpm -ivh jdk-<span style="color:darkred">11.0.3_linux-x64_bin</span>.rpm
Then exit the root shell (reboot is not required). By default, Java JDK is installed in {{path|/usr/java/}} directory. To install Oracle JDK to a custom directory, use <tt>rpm -ivh –prefix=/<path>/ rpmfile</tt> command. Once installed, you can delete the .rpm file.


Now you need to set up JAVA environment variables.
=={{anchor|openjdk}}Installing OpenJDK==
If you choose not to use the OpenJDK version provided by SEP sesam, download the required version either from [http://developers.redhat.com/products/openjdk/download Red Hat] or from the [https://github.com/ojdkbuild/ojdkbuild GitHub community].


===OpenJDK on Windows using the zip archive===
===OpenJDK on Windows using the zip archive===
To install OpenJDK on Windows using the zip archive, you need to download and unzip the archive.   
To install OpenJDK on Windows using the zip archive, you need to download and unzip the archive.   
#Sign in with the ''Administrator'' account and download either from [http://developers.redhat.com/products/openjdk/download Red Hat] or from the [https://github.com/ojdkbuild/ojdkbuild community] the required version. Then extract the zip file into a folder, typically {{path|C:\Program Files\Java\}}. A jdk-<no> folder is created (where the number depends on your installed version, for example, jdk-11 folder (where the bin folder is a direct sub-folder).  
<ol><li>Sign in with the ''Administrator'' account and download the required version either from [http://developers.redhat.com/products/openjdk/download Red Hat] or from the [https://github.com/ojdkbuild/ojdkbuild GitHub community]. Then extract the zip file into a folder, typically {{path|C:\Program Files\Java\}}. A ''jdk-<no>'' folder is created (where the number depends on your installed version, for example, ''jdk-11'') where the <tt>bin</tt> folder is a direct sub-folder.</li>
#Either set the PATH variable:
<li>Set the PATH variable in one of two ways:
## Select Control Panel -> System -> click Advanced -> Environment Variables. Then add the location of the <tt>bin</tt> folder of the JDK installation to the ''PATH variable'' in ''System Variables''. PATH variable example: "C:\Program Files\Java\jdk-11\bin"
<ol type="I"><li>Preferably specify the Java path during the installation of SEP sesam.</li>
##Set JAVA_HOME: Under ''System Variables'', click '''New''' and enter the variable name as JAVA_HOME. Then enter the variable value as the installation path of the JDK (without the bin sub-folder). Click OK and Apply Changes.
<li>Select ''Control Panel'' -> ''System'' -> click ''Advanced'' -> ''Environment Variables''. Then add the location of the <tt>bin</tt> folder of the JDK installation to the ''PATH variable'' in ''System Variables''. PATH variable example: "C:\Program Files\Java\jdk-11\bin".</li>
#Or specify the java path during installation of SEP sesam:
Then set ''JAVA_HOME'': Under ''System Variables'', click '''New''' and enter the variable name as JAVA_HOME. Then enter the variable value as the installation path of the JDK (without the bin sub-folder). Click ''OK'' and ''Apply Changes''.</li> </ol> </li> </ol>


===OpenJDK on Linux===
===OpenJDK on Linux===
To install OpenJDK on Red Hat Enterprise Linux, you must be running Red Hat Enterprise Linux 6. Verify that your RHE and Java versions are compatible.
There are multiple ways of installing Java on Linux. Make sure that you select the download version according to your operating system and to execute all commands as a ''root'' user or as an administrative user with the ''sudo'' command prefixed. Verify that your downloaded Java version and your Linux version are compatible; for example, to install OpenJDK11 on Red Hat Enterprise Linux, you must be running at least Red Hat Enterprise Linux 6.
#Log in with administrator access and [https://developers.redhat.com/products/openjdk/download download] the required version.
 
Once you have downloaded your version, use the following commands to install Java. For detailed instructions, refer to the respective Linux documentation. 
;Installing on RHEL:Log in with administrator access and [https://developers.redhat.com/products/openjdk/download download] the required version. Install the OpenJDK 11 package by running the command:
sudo yum install java-11-openjdk-devel
For details, check the RHEL documentation and the article [https://developers.redhat.com/blog/2018/11/05/migrating-from-oracle-jdk-to-openjdk-on-red-hat-enterprise-linux-what-you-need-to-know/ Migrating from Oracle JDK to OpenJDK on Red Hat Enterprise Linux: What you need to know].
 
;Installing Java JDK 11 from RPM:Make sure you change the version number to correspond to your downloaded version.
rpm -ivh jdk-<span style="color:darkred"><version></span>
For example:
# rpm -ivh jdk<span style="color:darkred">-11.0.1_linux-x64_bin.rpm
;Installing on Debian and Ubuntu:Use the below command to install OpenJDK using the package manager from the default repository. The command will install JDK and JRE; you can also choose to install only the JRE package.
sudo apt-get install openjdk-11-jre openjdk-11-jdk
 
==Installing Oracle Java==


===Verifying Java version===
===Windows===
To verify that your Java version is installed correctly, open up the Command Prompt and type
Download the [https://www.oracle.com/technetwork/java/javase/downloads/index.html Oracle Java] directly from the provided link, then run the installer – and you are set. Note that you need to specify the Java path during the installation of SEP sesam. For detailed instruction on installin Oracle Java, see https://docs.oracle.com/en/java/javase/11/install/installation-jdk-microsoft-windows-platforms.html#GUID-A7E27B90-A28D-4237-9383-A58B416071CA Installation of the JDK on Microsoft Windows Platforms].
===Linux===
Linux download and installation of Oracle Java depend on the type of installation packages: either it is an archive binary file (.tar.gz) or an RPM binary file (.rpm) for Linux platforms, such as Red Hat and SuSE. Thus you must ensure that your Java installation type (.tar.gz or .rpm) matches the SEP sesam installation package; if the SEP sesam Server is going to be installed as an .rpm package, Java must also be installed as .rpm. The following example is for installing Oracle Java .rpm. For installing the JDK for Linux from .tar.gz and for more information on Oracle Java on Linux, refer to [https://docs.oracle.com/en/java/javase/11/install/installation-jdk-linux-platforms.html#GUID-ADC9C14A-5F51-4C32-802C-9639A947317F Installation of the JDK on Linux Platforms]. 
<ol><li>Download the required [https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html Oracle Java JDK rpm binary package].</li>
<li>Install Java using the <tt>rpm</tt> command. Make sure you change the version number appropriately.
rpm -ivh jdk-<span style="color:darkred"><version></span>.rpm</li>
For example, to install Oracle Java JDK 11 (LTS):
rpm -ivh jdk-<span style="color:darkred">11.0.3_linux-x64_bin</span>.rpm
<li>Then exit the root shell (reboot is not required). By default, Java JDK is installed in {{path|/usr/java/}} directory. To install Oracle JDK to a custom directory, use <tt>rpm -ivh –prefix=/<path>/ rpmfile</tt> command. Once installed, you can delete the .rpm file.</li>
</li>Now you need to set up JAVA environment variables.</li></ol>
 
==Verifying Java version==
To verify that your Java version is installed correctly, open up the command prompt and enter:
  java -version
  java -version


==Setting preferred Java version for SEP sesam==
In case you have installed multiple Java versions on Windows, you may have to modify the SEP sesam Server configuration file <tt>sesam_install_dir>\var\ini\sm.ini</tt> to enable SEP sesam to use the specified Java version. The SEP sesam Server can work with a Java version other than the operating system's default Java version.
<tt>sm.ini</tt> includes a [JAVA] configuration section which specifies the path to the Java version detected during the installation of SEP sesam. You may enter another path for your selected Java version, for example, to configure SEP sesam to use a newly installed version of Java 11 instead of older Java 8.
<ol><li>
Before opening the <tt>sm.ini</tt> file using a text editor, [[Special:MyLanguage/How_to_Start_and_Stop_SEP_sesam|stop the SEP sesam services]] by using the <tt>sm_main stop</tt> command: </li>
C:\Program Files\SEPsesam\bin\sesam>sm_main stop
<li>Then open and modify the configuration file as follows:</li>
[JAVA]
java_exit_on_fail=no
java_interpreter=<span style="color:darkred">C:\Program Files\Java\jre1.8.0_162\bin\java.exe</span>
change to:
[JAVA]
java_exit_on_fail=no
java_interpreter=<span style="color:darkred">C:\Program Files\Java\jdk-11.0.2\bin\java.exe</span>
<li>Once you modified the configuration file and saved the changes, start SEP sesam service by using <tt>sm_main start</tt>.</li>
<li>Verify that the new JRE installation path is specified in the SEP sesam GUI properties in the ''Start'' menu and in the shortcut on desktop, as shown in the screenshot below.</li>
[[File:jreupdate.jpg|link=]]
<br clear=all>
</ol>
Alternatively, use the command <tt>sm_setup set_java_path -f "<Java_path"</tt> to modify the sm.ini configuration. In our example, the command is:
C:\Program Files\SEPsesam\bin\sesam>sm_setup set_java_path -f "C:\Program Files\Java\jdk-11.0.2"
Set java value in 'C:\ProgramData\SEPsesam\var\ini\sm.ini'
[JAVA]
java_interpreter=C:\Program Files\Java\jdk-11.0.2\bin\java.exe
java_version=11.0.2
ignore_java_home=yes
==See also==
==See also==
[[Special:MyLanguage/Java_Compatibility_Matrix|Java Compatibility Matrix]] – [[Special:MyLanguage/4_4_3:SEP_sesam_Quick_Install_Guide|SEP sesam Quick Install Guide]]
[[Special:MyLanguage/Java_Compatibility_Matrix|Java Compatibility Matrix]] – [[Special:MyLanguage/4_4_3:SEP_sesam_Quick_Install_Guide|SEP sesam Quick Install Guide]]

Revision as of 15:55, 11 July 2019

Copyright © SEP AG 1999-2024. All rights reserved.

Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.

Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.
Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3 Beefalo. For previous documentation version(s), check documentation archive.


Overview

The SEP sesam graphical user interface (GUI) is used to configure and manage SEP sesam and its environment. SEP sesam GUI is platform independent – it is based on Java and requires a Java Runtime Environment. The required Java version depends on SEP sesam version. To ensure that SEP sesam is running correctly, make sure to install and configure a supported Java version. See Java Compatibility Matrix for details.

Java is required on all systems that serve as SEP sesam Server, SEP sesam GUI client or SEP sesam Remote Device Server (RDS) when Si3 deduplication is used. Java is not required for SEP sesam Client (does not provide GUI) or for SEP sesam RDS if Si3 deduplication is not used.

The two main implementations of Java are OpenJDK and Oracle Java. As the differences between them are not that significant from the SEP sesam point of view and with Oracle announcing the end of free support for past versions of Java as well as the Oracle JDK binary no longer be free for use in production from JDK 11 on, SEP sesam introduced support for OpenJDK LTS (long term support) distributions that are available free of charge. Note that HiDPI displays are supported with the relevant Java version.

Prerequisites

  • On Windows, you may need Administrator privileges to install Java. Make sure to install Java from the provided Java download link before you install SEP sesam packages.
  • On Linux, all commands have to be executed as a root user or as an administrative user with the sudo command prefixed.
  • It is recommended to disable your firewall before starting the installation.
  • Make sure that system requirements for installing Java are met.
  • If you already have Java installed and you want to use multiple Java versions, make sure to configure the required version as explained in the section Configuring Java. If you do not need multiple Java versions, remove the Java installations not required by SEP sesam.

The following procedures show how to install different Java versions on Windows and Linux. SEP sesam recommends installing the SEP sesam Java distribution as described in the following section.

Installing SEP sesam Java distribution

How you install Java depends on the operating system as well as on the version you intend to install; you can install OpenJDK or Oracle Java. After installing the required Java version, you may have to enable and configure it.

Windows

Windows download and installation of OpenJDK is easy and pretty straightforward if you use the SEP sesam Java download: Download the Java directly from the provided link, then run the installer – and you are set. Note that you need to specify the Java path during the installation of SEP sesam.

Linux

As of SEP sesam 4.4.3 Beefalo, SEP sesam for Linux already includes the OpenJDK, thus no additional steps are required. However, if you opt for another Java version download then you have to download and install Java following the instructions offered by your Java provider.

Installing OpenJDK

If you choose not to use the OpenJDK version provided by SEP sesam, download the required version either from Red Hat or from the GitHub community.

OpenJDK on Windows using the zip archive

To install OpenJDK on Windows using the zip archive, you need to download and unzip the archive.

  1. Sign in with the Administrator account and download the required version either from Red Hat or from the GitHub community. Then extract the zip file into a folder, typically C:\Program Files\Java\. A jdk-<no> folder is created (where the number depends on your installed version, for example, jdk-11) where the bin folder is a direct sub-folder.
  2. Set the PATH variable in one of two ways:
    1. Preferably specify the Java path during the installation of SEP sesam.
    2. Select Control Panel -> System -> click Advanced -> Environment Variables. Then add the location of the bin folder of the JDK installation to the PATH variable in System Variables. PATH variable example: "C:\Program Files\Java\jdk-11\bin".
    3. Then set JAVA_HOME: Under System Variables, click New and enter the variable name as JAVA_HOME. Then enter the variable value as the installation path of the JDK (without the bin sub-folder). Click OK and Apply Changes.

OpenJDK on Linux

There are multiple ways of installing Java on Linux. Make sure that you select the download version according to your operating system and to execute all commands as a root user or as an administrative user with the sudo command prefixed. Verify that your downloaded Java version and your Linux version are compatible; for example, to install OpenJDK11 on Red Hat Enterprise Linux, you must be running at least Red Hat Enterprise Linux 6.

Once you have downloaded your version, use the following commands to install Java. For detailed instructions, refer to the respective Linux documentation.

Installing on RHEL
Log in with administrator access and download the required version. Install the OpenJDK 11 package by running the command:
sudo yum install java-11-openjdk-devel

For details, check the RHEL documentation and the article Migrating from Oracle JDK to OpenJDK on Red Hat Enterprise Linux: What you need to know.

Installing Java JDK 11 from RPM
Make sure you change the version number to correspond to your downloaded version.
rpm -ivh jdk-<version>

For example:

# rpm -ivh jdk-11.0.1_linux-x64_bin.rpm
Installing on Debian and Ubuntu
Use the below command to install OpenJDK using the package manager from the default repository. The command will install JDK and JRE; you can also choose to install only the JRE package.
sudo apt-get install openjdk-11-jre openjdk-11-jdk

Installing Oracle Java

Windows

Download the Oracle Java directly from the provided link, then run the installer – and you are set. Note that you need to specify the Java path during the installation of SEP sesam. For detailed instruction on installin Oracle Java, see https://docs.oracle.com/en/java/javase/11/install/installation-jdk-microsoft-windows-platforms.html#GUID-A7E27B90-A28D-4237-9383-A58B416071CA Installation of the JDK on Microsoft Windows Platforms].

Linux

Linux download and installation of Oracle Java depend on the type of installation packages: either it is an archive binary file (.tar.gz) or an RPM binary file (.rpm) for Linux platforms, such as Red Hat and SuSE. Thus you must ensure that your Java installation type (.tar.gz or .rpm) matches the SEP sesam installation package; if the SEP sesam Server is going to be installed as an .rpm package, Java must also be installed as .rpm. The following example is for installing Oracle Java .rpm. For installing the JDK for Linux from .tar.gz and for more information on Oracle Java on Linux, refer to Installation of the JDK on Linux Platforms.

  1. Download the required Oracle Java JDK rpm binary package.
  2. Install Java using the rpm command. Make sure you change the version number appropriately. rpm -ivh jdk-<version>.rpm
  3. For example, to install Oracle Java JDK 11 (LTS): rpm -ivh jdk-11.0.3_linux-x64_bin.rpm
  4. Then exit the root shell (reboot is not required). By default, Java JDK is installed in /usr/java/ directory. To install Oracle JDK to a custom directory, use rpm -ivh –prefix=/<path>/ rpmfile command. Once installed, you can delete the .rpm file.
  5. Now you need to set up JAVA environment variables.

Verifying Java version

To verify that your Java version is installed correctly, open up the command prompt and enter:

java -version

Setting preferred Java version for SEP sesam

In case you have installed multiple Java versions on Windows, you may have to modify the SEP sesam Server configuration file sesam_install_dir>\var\ini\sm.ini to enable SEP sesam to use the specified Java version. The SEP sesam Server can work with a Java version other than the operating system's default Java version.

sm.ini includes a [JAVA] configuration section which specifies the path to the Java version detected during the installation of SEP sesam. You may enter another path for your selected Java version, for example, to configure SEP sesam to use a newly installed version of Java 11 instead of older Java 8.

  1. Before opening the sm.ini file using a text editor, stop the SEP sesam services by using the sm_main stop command:
  2. C:\Program Files\SEPsesam\bin\sesam>sm_main stop
  3. Then open and modify the configuration file as follows:
  4. [JAVA] java_exit_on_fail=no java_interpreter=C:\Program Files\Java\jre1.8.0_162\bin\java.exe change to: [JAVA] java_exit_on_fail=no java_interpreter=C:\Program Files\Java\jdk-11.0.2\bin\java.exe
  5. Once you modified the configuration file and saved the changes, start SEP sesam service by using sm_main start.
  6. Verify that the new JRE installation path is specified in the SEP sesam GUI properties in the Start menu and in the shortcut on desktop, as shown in the screenshot below.
  7. Jreupdate.jpg

Alternatively, use the command sm_setup set_java_path -f "<Java_path" to modify the sm.ini configuration. In our example, the command is:

C:\Program Files\SEPsesam\bin\sesam>sm_setup set_java_path -f "C:\Program Files\Java\jdk-11.0.2"
Set java value in 'C:\ProgramData\SEPsesam\var\ini\sm.ini'
[JAVA]
java_interpreter=C:\Program Files\Java\jdk-11.0.2\bin\java.exe
java_version=11.0.2
ignore_java_home=yes

See also

Java Compatibility MatrixSEP sesam Quick Install Guide