Skip to content

Commit 61cf32c

Browse files
committed
fix: #295
1 parent 4acecad commit 61cf32c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • app_pojavlauncher/src/main/java/net/kdt/pojavlaunch

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,16 @@ public static String generateLaunchClasspath(JMinecraftVersionList.Version info,
885885
String internalLwjglVersion = iLwjglVersion >= 341 ? "3.4.1" : "3.3.3";
886886
File lwjgl3Folder = new File(Tools.DIR_GAME_HOME, "lwjgl3/"+internalLwjglVersion);
887887
String lwjglCore = lwjgl3Folder.getAbsolutePath() + "/lwjgl.jar";
888-
String lwjglMerged = lwjgl3Folder.getAbsolutePath() + "/lwjgl-"+internalLwjglVersion+"-merged-modules";
888+
String lwjglMerged = lwjgl3Folder.getAbsolutePath() + "/lwjgl-"+internalLwjglVersion+"-merged-modules.jar";
889889
String lwjglxFile = lwjgl3Folder + "/lwjgl-lwjglx.jar";
890890

891-
891+
if (!new File(lwjglCore).exists() || !new File(lwjglMerged).exists() || !new File(lwjglxFile).exists()) {
892+
try { // Delete the folder so on restart will re-extract them.
893+
if (lwjgl3Folder.exists())
894+
org.apache.commons.io.FileUtils.deleteDirectory(lwjgl3Folder);
895+
} catch (IOException ignored) {}
896+
throw new RuntimeException("LWJGL jars incomplete, restart the app to reextract them.");
897+
}
892898
launchClasspath.append(lwjglCore).append(":");
893899
// 2nd in priority in case we need to merge lwjgl.jar again for testing
894900
launchClasspath.append(lwjglMerged).append(":");

0 commit comments

Comments
 (0)