I’m writing a desktop Java application which basically runs in the system tray. This application can accept a command line parameter. If there’s an instance of the application running and another instance is invoked with a command line argument, it simply passes it to the the running process in the system tray.
I’m very lost as to how to implement this? I’ve seen some apps do it, but I don’t remember the name. All I’d like to pass is the string argument and then exit.
Basically the idea is to bind a local port on start up, if fails connects to it and send parameters.