Merge pull request #1072 from AhmedMagedC/bug-fix

Terminate JVM of already running instances
This commit is contained in:
Raphaël de Courville
2025-07-11 12:30:44 +02:00
committed by GitHub
+10 -1
View File
@@ -251,7 +251,16 @@ public class Base {
// long t2 = System.currentTimeMillis();
if (DEBUG || !SingleInstance.alreadyRunning(args)) {
// boolean flag indicating whether to create new server instance or not
boolean createNewInstance = DEBUG || !SingleInstance.alreadyRunning(args);
// free up resources by terminating the JVM
if(!createNewInstance){
System.exit(0);
return;
}
if (createNewInstance) {
// Set the look and feel before opening the window
try {
Platform.setLookAndFeel();