Skip to content

Commit ac565f6

Browse files
committed
🐛 When the cacheName does not match the name of the downloaded jdk
1 parent f518afe commit ac565f6

File tree

1 file changed

+2
-1
lines changed
  • dev.skidfuscator.obfuscator/src/main/java/dev/skidfuscator/obfuscator/util

1 file changed

+2
-1
lines changed

dev.skidfuscator.obfuscator/src/main/java/dev/skidfuscator/obfuscator/util/JdkDownloader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public class JdkDownloader {
1717
private static final String OS;
1818
private static final String JDK_URL;
1919
private static boolean jdkDownloaded = false;
20+
private static final String REGEX_TAR_GZ = ".tar.gz";
2021

2122
static {
2223
// handle for all os
@@ -47,7 +48,7 @@ public static Path getCachedJdk() throws IOException {
4748

4849
switch (OS) {
4950
case "linux":
50-
cacheName = "jdk-17.0.2";
51+
cacheName = Paths.get(JDK_URL).getFileName().toString().split(REGEX_TAR_GZ)[0];
5152
break;
5253
case "mac os x":
5354
case "mac":

0 commit comments

Comments
 (0)