Repository: HMCL-dev/HMCL (language: java)

Issue:
[Feature] 在~/.jdks目录中寻找java
### 描述 | Description

如题，在~/.jdks (%userprofile%/.jdks)目录中寻找java

### 原因 | Reason

这个文件夹里边的Java不会被默认添加到PATH，但是我们并不想将其添加到path。


Discussion / hints:
这是自己创建的，还是发行版的路径？

https://docs.hmcl.net/modpack/bundled-java.html

看看这个？
intellij idea会在这个目录下载java，并不是整合包

Fix patch:
diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/java/JavaManager.java b/HMCL/src/main/java/org/jackhuang/hmcl/java/JavaManager.java
index 3b9e86e815..a5592e6a9b 100644
--- a/HMCL/src/main/java/org/jackhuang/hmcl/java/JavaManager.java
+++ b/HMCL/src/main/java/org/jackhuang/hmcl/java/JavaManager.java
@@ -404,9 +404,9 @@ private static Map<Path, JavaRuntime> searchPotentialJavaExecutables() {
             FileUtils.tryGetPath(Lang.requireNonNullElse(System.getenv("ProgramFiles(x86)"), "C:\\Program Files (x86)"), "Minecraft Launcher\\runtime")
                     .ifPresent(it -> searchAllOfficialJava(javaRuntimes, it, false));
         } else if (OperatingSystem.CURRENT_OS == OperatingSystem.LINUX && Architecture.SYSTEM_ARCH == Architecture.X86_64) {
-            searchAllOfficialJava(javaRuntimes, Paths.get(System.getProperty("user.home")).resolve(".minecraft/runtime"), false);
+            searchAllOfficialJava(javaRuntimes, Paths.get(System.getProperty("user.home"), ".minecraft/runtime"), false);
         } else if (OperatingSystem.CURRENT_OS == OperatingSystem.OSX) {
-            searchAllOfficialJava(javaRuntimes, Paths.get(System.getProperty("user.home")).resolve("Library/Application Support/minecraft/runtime"), false);
+            searchAllOfficialJava(javaRuntimes, Paths.get(System.getProperty("user.home"), "Library/Application Support/minecraft/runtime"), false);
         }
         searchAllOfficialJava(javaRuntimes, CacheRepository.getInstance().getCacheDirectory().resolve("java"), true);
 
@@ -430,6 +430,7 @@ private static Map<Path, JavaRuntime> searchPotentialJavaExecutables() {
                 }
             }
         }
+        searchAllJavaInDirectory(javaRuntimes, Paths.get(System.getProperty("user.home"), ".jdks"));
 
         for (String javaPath : ConfigHolder.globalConfig().getUserJava()) {
             try {
diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/java/JavaInfo.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/java/JavaInfo.java
index 160a152bb7..dc4be6700b 100644
--- a/HMCLCore/src/main/java/org/jackhuang/hmcl/java/JavaInfo.java
+++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/java/JavaInfo.java
@@ -129,6 +129,8 @@ public static String normalizeVendor(String vendor) {
                 return "IBM";
             case "Eclipse Adoptium":
                 return "Adoptium";
+            case "Amazon.com Inc.":
+                return "Amazon";
             default:
                 return vendor;
         }


Test patch: