0

when user runs the application twice or more in the system tray number of running same application increases , this creates parallely multiply running on same application how to handle this?

Here is the picture to understand what I am talking about:

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
mussdroid
  • 732
  • 1
  • 9
  • 22
  • 1
    Use a lock file, open a socket, render some aspect that an instance of the application needs to check before continuing to load and stop if it can't satisfy that check... – MadProgrammer Aug 22 '14 at 07:04
  • do you have some samples ? – mussdroid Aug 22 '14 at 07:05
  • You've never checked for an existence of a file? You've never created a file before? What about registering a `ServerSocket` to port? – MadProgrammer Aug 22 '14 at 07:10
  • I believe I am fully new on this issue , where to start ? – mussdroid Aug 22 '14 at 07:13
  • 1
    [`java.io.file`](http://docs.oracle.com/javase/7/docs/api/java/io/File.html), [Basic I/O](http://docs.oracle.com/javase/tutorial/essential/io/), [All About Sockets](http://docs.oracle.com/javase/tutorial/networking/sockets/) – MadProgrammer Aug 22 '14 at 07:18
  • 1
    @okrman You are just continuing to ask us to find things for you. Why don't you stop asking and start searching? There is a duplicate question that you can see, and a thing named "Google" that exists for that purpose. A simple google search will show you a lot of examples. – BackSlash Aug 22 '14 at 07:21
  • I am sorry for misunderstanding backslash , before approaching google i need to learn what is the technical issue I am facing , thats why I keep investigating what kind of problem i am having then I google , i have already find youtube video http://www.youtube.com/watch?v=jcsvt_6m21E thanks for help. I didn't now about lock files before thats why I came to stack first ! Sure I am researching of course – mussdroid Aug 22 '14 at 07:25
  • finally I did , if you haven't told me that is about single instance issue maybe I would never found the issue here is to code if you are interested ! If there is logical mistake please comment but looks ok for me https://www.dropbox.com/s/5nmgiah5bm45v3i/singleinstance.java – mussdroid Aug 22 '14 at 12:55
  • I have an another issue now my notification pop is not displaying – mussdroid Aug 22 '14 at 14:48

0 Answers0