GIS Mẹo vặt Sói's Tutorials WebGIS

[GeoServer] Fix lỗi Cannot find current JDK installation 2021

Table of Content

[GeoServer] Fix lỗi Cannot find current JDK installation 2021

Info XAMPP and Java

XAMPP

###### ApacheFriends XAMPP Version 7.4.19 ######

Important! PHP in this package needs the Microsoft Visual C++ 2017 Redistributable package from
http://www.microsoft.com/en-us/download/. Please ensure that the VC++ 2017 runtime
libraries are installed on your system.

  + Apache 2.4.47
  + MariaDB 10.4.19
  + PHP 7.4.19 (VC15 X86 64bit thread safe) + PEAR
  + phpMyAdmin 5.1.0
  + OpenSSL 1.1.0g
  + ADOdb 518a
  + Mercury Mail Transport System v4.63 (not included in the portable version)
  + FileZilla FTP Server 0.9.41 (not included in the portable version)
  + Webalizer 2.23-04 (not included in the portable version)
  + Strawberry Perl 5.32.0.1 Portable
  + Tomcat 8.5.65
  + XAMPP Control Panel Version 3.3.0.
  + XAMPP mailToDisk 1.0 (write emails via PHP on local disk in <xampp>\mailoutput. Activated in the php.ini as mail default.)

---------------------------------------------------------------

* System Requirements:

  + 64 MB RAM (RECOMMENDED)
  + 750 MB free fixed disk
  + Windows 7, Windows 8, Windows 10

---------------------------------------------------------------

Java

jdk-13.0.1_windows-x64_bin.exe

Error info

When run catalina_start.bat

C:\xampp\tomcat>catalina_start.bat

[XAMPP]: Searching JDK HOME with reg query ...
ERROR: The system was unable to find the specified registry key or value.
. [XAMPP]: Cannot find current JDK installation!
. [XAMPP]: Cannot set JAVA_HOME. Aborting ...
done.
Press any key to continue . . .

image

Error Cause

Nguyên nhân do version mới của tomcat đọc vào registry để tìm path đến java. Mà java 13 mình cài nó thay đổi cấu trúc registry. Cụ thể thằng tomcat tìm thư mục HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit

image

Tuy nhiên bản Java 13 lại ko có mục này mà thay bằng mục JDK, thế là cả 2 không tim ra nhau =))

image

How to fix

Đơn giản là vô edit lại dòng đọc vào thông tin registry thôi

Bỏ dòng set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit

Sửa thành set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK

image

Bon!

Leave a Reply

Your email address will not be published. Required fields are marked *