Difference between revisions of "Switch to Java17 on Windows"

From LogicalDOC Community Wiki
Jump to navigationJump to search
(Created page with "=== Reconfigure LogicalDOC to use Java 17 on Windows === Starting from version 8.9.1 LogicalDOC does not work with Java11 anymore so you have to install Java11. It is import...")
 
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
=== Reconfigure LogicalDOC to use Java 17 on Windows ===
 
=== Reconfigure LogicalDOC to use Java 17 on Windows ===
  
Starting from version 8.9.1 LogicalDOC does not work with Java11 anymore so you have to install Java11.
+
Starting from version 8.9.1 LogicalDOC does not work with Java11 anymore so you have to install Java17.
 +
Please read first [https://docs.logicaldoc.com/en/installation how to install the right Java to use with LogicalDOC].
  
It is important to install Java17, because Java17 is the latest LTS(Long Term Support) release available at the moment.
+
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.<br><br>
  
Given '''<LDOC_HOME>''' the installation path of LogicalDOC(by default it is C:\LogicalDOC), please proceed as follows:
+
Given '''<LDOC_HOME>''' the installation path of LogicalDOC (by default it is C:\LogicalDOC), please proceed as follows:
  
1. Install Java11 from Oracle or OpenJDK 11
+
1. Install [https://docs.logicaldoc.com/en/installation Java17 from Oracle or OpenJDK17]
  
 
2. Open a shell as Administator and go to '''<LDOC_HOME>'''\tomcat\bin\
 
2. Open a shell as Administator and go to '''<LDOC_HOME>'''\tomcat\bin\
  
3. Execute the command '''tomcat8w.exe //MS/LogicalDOC'''   (if you do not have tomcat8w.exe use LogicalDOCw.exe instead)
+
3. Execute the command '''LogicalDOCw.exe //MS/LogicalDOC'''
  
 
4. This creates a tray icon with the LogicalDOC’s logo
 
4. This creates a tray icon with the LogicalDOC’s logo
Line 19: Line 20:
  
 
6. Now open the <b>Java</b> tab<br/>
 
6. Now open the <b>Java</b> tab<br/>
[[Image:ldoc_config.png]]
+
[[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)
+
7. In the '''Java Virtual Machine''' put the full path of your jvm.dll (something like C:\Program Files\Java\jdk-17\bin\server)
  
8. In the '''Java Options''' text area, delete what you have and put this new text (remember to replace ''<LDOC_HOME> with your LogicalDOC’s installation folder)'':
+
8. Click on '''Apply''' and then '''Ok'''
  
<div style="margin-left:1.7cm;margin-right:0cm;">''-Dcatalina.home='''<LDOC_HOME>'''\tomcat''</div>
+
9. Restart the '''LogicalDOC''' service
  
<div style="margin-left:1.7cm;margin-right:0cm;">''-Dcatalina.base='''<LDOC_HOME>'''\tomcat''</div>
+
10. Open a shell as Administator and go to '''<LDOC_HOME>'''\update-wd
  
<div style="margin-left:1.7cm;margin-right:0cm;">''-Dignore.endorsed.dirs='''<LDOC_HOME>'''\tomcat\endorsed''</div>
+
11. Execute the command '''update-wdw.exe //MS/LogicalDOC-Update''
  
<div style="margin-left:1.7cm;margin-right:0cm;">''-Djava.io.tmpdir='''<LDOC_HOME>'''\tomcat\temp''</div>
+
12. This creates another tray icon with the LogicalDOC’s logo
  
<div style="margin-left:1.7cm;margin-right:0cm;">''-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager''</div>
+
13. Right click on it and choose <b>Configure...</b><br/>
 
 
<div style="margin-left:1.7cm;margin-right:0cm;">''-Djava.util.logging.config.file='''<LDOC_HOME>'''\tomcat\conf\logging.properties''</div>
 
 
 
<div style="margin-left:1.7cm;margin-right:0cm;">''-Dsolr.disable.shardsWhitelist=true''</div>
 
 
 
9. Clear the Java 9 Options
 
 
 
10. Click on '''Apply''' and then '''Ok'''
 
 
 
11. Restart the '''LogicalDOC''' service
 
 
 
12. Open a shell as Administator and go to '''<LDOC_HOME>'''\update-wd
 
 
 
13. Execute the command '''update-wdw.exe //MS/LogicalDOC-Update''
 
 
 
14. This creates another tray icon with the LogicalDOC’s logo
 
 
 
15. Right click on it and choose <b>Configure...</b><br/>
 
 
[[Image:update_tray.png]]
 
[[Image:update_tray.png]]
  
16. Now open the <b>Java</b> tab<br/>
+
14. Now open the <b>Java</b> tab<br/>
[[Image:update_config.png]]
+
[[Image:udpatewd-java17.png]]
  
17. 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)
+
15. In the '''Java Virtual Machine''' put the full path of your jvm.dll (something like C:\Program Files\Java\jdk-17\bin\server)
  
18. Click on '''Apply''' and then '''Ok'''
+
16. Click on '''Apply''' and then '''Ok'''
  
19. Define the a system variable '''JAVA_HOME''' pointing to the Java11 installation path (something like C:\Program Files\Java\jdk-11.0.4)
+
17. Define the a system variable '''JAVA_HOME''' pointing to the Java17 installation path (something like C:\Program Files\Java\jdk-17)
  
20. Restart the '''LogicalDOC Update''' service
+
18. Restart the '''LogicalDOC Update''' service

Latest revision as of 05:25, 3 June 2024

Reconfigure LogicalDOC to use Java 17 on Windows

Starting from version 8.9.1 LogicalDOC does not work with Java11 anymore so you have to install Java17. Please read first how 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 C:\LogicalDOC), please proceed as follows:

1. Install Java17 from Oracle or OpenJDK17

2. Open a shell as Administator and go to <LDOC_HOME>\tomcat\bin\

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...
Ldoc tray.png

6. Now open the Java tab
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-17\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 Configure...
Update tray.png

14. Now open the Java tab
Udpatewd-java17.png

15. In the Java Virtual Machine put the full path of your jvm.dll (something like C:\Program Files\Java\jdk-17\bin\server)

16. Click on Apply and then Ok

17. Define the a system variable JAVA_HOME pointing to the Java17 installation path (something like C:\Program Files\Java\jdk-17)

18. Restart the LogicalDOC Update service