Difference between revisions of "Switch to Java17 on Linux"

From LogicalDOC Community Wiki
Jump to navigationJump to search
(Created page with "=== Reconfigure LogicalDOC to use Java 17 on Linux === Starting from version 8.9.1 LogicalDOC does not work with Java11 anymore so you have to install Java17. Please read fir...")
 
Line 10: Line 10:
 
1. Install [https://docs.logicaldoc.com/en/installation|Java17 from Oracle or OpenJDK17]
 
1. Install [https://docs.logicaldoc.com/en/installation|Java17 from Oracle or OpenJDK17]
  
for CenOS and RedHat:
+
Hint for Ubuntu:
wget https://download.java.net/openjdk/jdk17/ri/openjdk-17+35_linux-x64_bin.tar.gz
+
<source>$ apt install -y openjdk-17-jdk</source>
tar xvf openjdk*
+
Hint for CentOS and RedHat:
sudo mv jdk-17 /usr/java/
+
<source>
sudo ln -sfn /usr/java/jdk-17 /usr/java/latest  
+
$ wget https://download.java.net/openjdk/jdk17/ri/openjdk-17+35_linux-x64_bin.tar.gz
 +
$ tar xvf openjdk*
 +
$ sudo mv jdk-17 /usr/java/
 +
$ sudo ln -sfn /usr/java/jdk-17 /usr/java/latest  
 +
</source>
  
for Ubuntu:
+
2. With VI, or any other text editor, open the file '''<LDOC_HOME>'''/bin/logicaldoc.sh.
apt install -y openjdk-17-jdk
+
Inside that file, locate the variable '''JAVA_HOME''' and make sure it points to the Java17 installation folder:<br>
 +
Probable path in Ubuntu:
 +
<source>export JAVA_HOME=/usr</source>
 +
Probable path in CentOS and RedHat:
 +
<source>export JAVA_HOME=/usr/java/latest</source>
  
 +
3. Iterate the point 2 for this list of additional files:
 +
- '''<LDOC_HOME>'''/bin/update.sh
 +
- '''<LDOC_HOME>'''/bin/patch.sh
 +
- '''<LDOC_HOME>'''/bin/restart.sh
 +
- '''<LDOC_HOME>'''/bin/reset-passwd.sh
  
2. Open a shell as Administator and go to '''<LDOC_HOME>'''\tomcat\bin\
+
4. Restart LogicalDOC
 
 
3. Execute the command '''LogicalDOCw.exe //MS/LogicalDOC'''
 
 
 
4. This creates a tray icon with the LogicalDOC’s logo
 
 
 
5. Right click on it and choose '''Configure...'''<br/>
 
[[Image:Ldoc_tray.png]]
 
 
 
6. Now open the <b>Java</b> tab<br/>
 
[[Image:Java-virtual-machine.png]]
 
 
 
7. In the '''Java Virtual Machine''' put the full path of your jvm.dll (something like C:\Program Files\Java\jdk-11.0.4\bin\server)
 
 
 
8. Click on '''Apply''' and then '''Ok'''
 
 
 
9. Restart the '''LogicalDOC''' service
 
 
 
10. Open a shell as Administator and go to '''<LDOC_HOME>'''\update-wd
 
 
 
11. Execute the command '''update-wdw.exe //MS/LogicalDOC-Update''
 
 
 
12. This creates another tray icon with the LogicalDOC’s logo
 
 
 
13. Right click on it and choose <b>Configure...</b><br/>
 
[[Image:update_tray.png]]
 
 
 
14. Now open the <b>Java</b> tab<br/>
 
[[Image:udpatewd-java17.png]]
 
 
 
15. In the '''Java Virtual Machine''' put the full path of your jvm.dll (something like C:\Program Files\Java\jdk-11.0.4\bin\server)
 
 
 
16. Click on '''Apply''' and then '''Ok'''
 
 
 
17. Define the a system variable '''JAVA_HOME''' pointing to the Java11 installation path (something like C:\Program Files\Java\jdk-11.0.4)
 
 
 
18. Restart the '''LogicalDOC Update''' service
 

Revision as of 09:01, 11 March 2024

Reconfigure LogicalDOC to use Java 17 on Linux

Starting from version 8.9.1 LogicalDOC does not work with Java11 anymore so you have to install Java17. Please read first to install the right Java to use with LogicalDOC.

It is important to install Java17 and not Java18 nor Java19, because Java17 is the latest LTS(Long Term Support) release available at the moment.

Given <LDOC_HOME> the installation path of LogicalDOC(by default it is /LogicalDOC), please proceed as follows:

1. Install from Oracle or OpenJDK17

Hint for Ubuntu:

$ apt install -y openjdk-17-jdk

Hint for CentOS and RedHat:

$ wget https://download.java.net/openjdk/jdk17/ri/openjdk-17+35_linux-x64_bin.tar.gz
$ tar xvf openjdk*
$ sudo mv jdk-17 /usr/java/
$ sudo ln -sfn /usr/java/jdk-17 /usr/java/latest

2. With VI, or any other text editor, open the file <LDOC_HOME>/bin/logicaldoc.sh. Inside that file, locate the variable JAVA_HOME and make sure it points to the Java17 installation folder:
Probable path in Ubuntu:

export JAVA_HOME=/usr

Probable path in CentOS and RedHat:

export JAVA_HOME=/usr/java/latest

3. Iterate the point 2 for this list of additional files: - <LDOC_HOME>/bin/update.sh - <LDOC_HOME>/bin/patch.sh - <LDOC_HOME>/bin/restart.sh - <LDOC_HOME>/bin/reset-passwd.sh

4. Restart LogicalDOC