mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #1072 from AhmedMagedC/bug-fix
Terminate JVM of already running instances
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user