diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java index 6260d918..3befbc49 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java @@ -427,7 +427,11 @@ private static void checkAndUsedJSPH(final Runtime runtime) { File[] files = dir.listFiles((dir1, name) -> name.startsWith(jsphName)); if (files != null && files.length > 0) { String libName = NATIVE_LIB_DIR + "/" + jsphName + ".so"; - Os.setenv("JSP", libName, true); + try { + Os.setenv("JSP", libName, true); + } catch (Exception e) { + System.err.println("Error setting environment variable: " + e.getMessage()); + } } else { System.out.println("Native: Library " + jsphName + ".so not found, some mod cannot used"); }