Join Slack
Powered by
is there easy way to prevent run multiple instance...
# tornadofx
r
Roman
12/10/2018, 5:59 AM
is there easy way to prevent run multiple instance application? windows 10, exe created with javapackager
c
Czar
12/10/2018, 6:54 AM
This question is really not relevant in this slack and channel, next time use google please. But this time here ya go 🙂
https://rosettacode.org/wiki/Determine_if_only_one_instance_is_running
Czar
12/10/2018, 7:00 AM
By the way, examples in different languages utilize different strategies, the ones offered for Kotlin and Java are unfortunate unreliable hacks, I'd resort to lock files instead of a network port.
Czar
12/10/2018, 7:02 AM
And this is even more foolproof, although you will need JNA:
https://stackoverflow.com/questions/44744804/how-can-you-use-a-mutex-between-c-sharp-and-java-processes
r
Romanow
12/10/2018, 10:53 AM
We use jUnique for that
Romanow
12/10/2018, 10:54 AM
https://mvnrepository.com/artifact/it.sauronsoftware/junique/1.0.4
8
Views
Open in Slack
Previous
Next