mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 04:16:02 -04:00
在 ./.hmcl/java 中搜索 Java
This commit is contained in:
parent
9969dc60c5
commit
a0cebee8cf
@ -56,6 +56,7 @@ public final class JavaManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final HMCLJavaRepository REPOSITORY = new HMCLJavaRepository(Metadata.HMCL_GLOBAL_DIRECTORY.resolve("java"));
|
public static final HMCLJavaRepository REPOSITORY = new HMCLJavaRepository(Metadata.HMCL_GLOBAL_DIRECTORY.resolve("java"));
|
||||||
|
public static final HMCLJavaRepository LOCAL_REPOSITORY = new HMCLJavaRepository(Metadata.HMCL_CURRENT_DIRECTORY.resolve("java"));
|
||||||
|
|
||||||
public static String getMojangJavaPlatform(Platform platform) {
|
public static String getMojangJavaPlatform(Platform platform) {
|
||||||
if (platform.getOperatingSystem() == OperatingSystem.WINDOWS) {
|
if (platform.getOperatingSystem() == OperatingSystem.WINDOWS) {
|
||||||
@ -568,6 +569,10 @@ public final class JavaManager {
|
|||||||
for (JavaRuntime java : REPOSITORY.getAllJava(platform)) {
|
for (JavaRuntime java : REPOSITORY.getAllJava(platform)) {
|
||||||
javaRuntimes.put(java.getBinary(), java);
|
javaRuntimes.put(java.getBinary(), java);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (JavaRuntime java : LOCAL_REPOSITORY.getAllJava(platform)) {
|
||||||
|
javaRuntimes.put(java.getBinary(), java);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void searchAllOfficialJava(Map<Path, JavaRuntime> javaRuntimes, Path directory, boolean verify) {
|
private static void searchAllOfficialJava(Map<Path, JavaRuntime> javaRuntimes, Path directory, boolean verify) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user