I am working in a desktop application created in java. we are working for windows version (for running on windows O.S.) of the application. When we run our application, it creates a tray icon on desktop by using systemtray as
SystemTray tray = SystemTray.getSystemTray();
I am creating single instance of the system tray, which I am creating in the main class of the application.
I am creating exe for my application. My problem is when i am running the exe file of my application, it creates tray icon every time.
I want in my application only one tray icon present on desktop and running as a service. this icon should only get removed, when application is uninstalled. It should run as service in the background.
I am not getting any way which will help me to run my application as a service and there should be only one instance running in the background.
I want to run my application by creating a tray icon as a service and should have single instance present. Please guide me in this issue.
Thanks for your all valuable suggestions in advance.