Skip to content

Commit 8eb6e1a

Browse files
committed
Make single-instance behavior opt-in via scijava.app.single-instance property
Single-instance mode is now only activated when the system property scijava.app.single-instance=true is set. This makes the feature opt-in rather than mandatory, allowing applications that need multiple concurrent instances to run without modification.
1 parent 20e1451 commit 8eb6e1a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/org/scijava/launcher/ClassLauncher.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ public static void main(final String... args) {
8080
if (Boolean.getBoolean("scijava.app.unlock-modules")) {
8181
ReflectionUnlocker.unlockAll();
8282
}
83-
if (SingleInstance.tryHandoff(args)) System.exit(0);
83+
if (Boolean.getBoolean("scijava.app.single-instance")) {
84+
if (SingleInstance.tryHandoff(args)) System.exit(0);
85+
}
8486
tryToRun(Splash::show);
8587
tryToRun(Java::check);
8688
String appName = appName();

0 commit comments

Comments
 (0)