File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
dev.skidfuscator.obfuscator/src/main/java/dev/skidfuscator/obfuscator/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ 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" ;
21+ public static final Path CACHE_DIR = Paths .get (System .getProperty ("user.home" ), ".ssvm" , "jdk" );
2022
2123 static {
2224 // handle for all os
@@ -40,14 +42,12 @@ public class JdkDownloader {
4042 }
4143 }
4244
43- public static final Path CACHE_DIR = Paths .get (System .getProperty ("user.home" ), ".ssvm" , "jdk" );
44-
4545 public static Path getCachedJdk () throws IOException {
4646 String cacheName ;
4747
4848 switch (OS ) {
4949 case "linux" :
50- cacheName = "jdk-17.0.2" ;
50+ cacheName = Paths . get ( JDK_URL ). getFileName (). toString (). split ( REGEX_TAR_GZ )[ 0 ] ;
5151 break ;
5252 case "mac os x" :
5353 case "mac" :
You can’t perform that action at this time.
0 commit comments