473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Running single Instance of java application

2
Hi,

I developed a swing based application in java. I am running it through the executable jar. Each time clicking on the jar file it opens the new instance of the appliction.

But I want to open the single instance of the application i.e. If the application is running , then user tries to open another instance it should be display the error or running application only like yahoomessenger,notepad,etc.

Please tell me how it is done in java. send aly sample code or resources regarding this.

Thanks
in advance
Sep 13 '06 #1
1 5646
PLA
44
Hi,

I developed a swing based application in java. I am running it through the executable jar. Each time clicking on the jar file it opens the new instance of the appliction.

But I want to open the single instance of the application i.e. If the application is running , then user tries to open another instance it should be display the error or running application only like yahoomessenger,notepad,etc.

Please tell me how it is done in java. send aly sample code or resources regarding this.

Thanks
in advance
You can use a file as a flag: When you start test the existence of the file, if not create it and start your app, whe your app is finish, delete the file. Sorry no sample code.
Sep 13 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Michael Williams | last post by:
Hi, I am trying to create a VB6 application which can act as a 'connection broker' for other applications being run on the same machine. Essentially, the broker app will setup a number of...
0
by: James-D-Bloom | last post by:
I have developed a fully open source & free application that can alter (or simulate the affect of altering) loaded Java classes at runtime. This means you can change a program at runtime without...
8
by: Chris Thunell | last post by:
I have created a VB.net windows forms application. If I have the program running and then I mistakenly click on my desktop icon again, I get a second instance of the program running. Is there...
2
by: PJ Olson | last post by:
I have an app that allows only one instance to run at a time. I have a file extension associated with this app and would like to pass a running instance the file name if a user double-clicks the...
4
by: Juan Manuel Alegría B. | last post by:
Hi, I need to know if an application is running because I want just one instance of this application. So I'll execute it only if it is not running. Thanks so much.
3
by: Rune Jacobsen | last post by:
Hey all, Maybe someone knows this problem; I have a C# WinForms app that every now and then has a new version that I deploy to my users using an installation script written with the NSIS...
3
by: Michel | last post by:
Hi, I wrote an app in .Net and I whant only 1 instance of this app open for the user; the user open my app, do some works and try to open another instance of my app, I whant to show a message to...
19
by: srinivask | last post by:
kindly give java code how to run a single instance in java for exe application based on gui
6
by: Jen | last post by:
I've implemented single-instance functionality in my .exe by using the mutex method. Works great. But when the .exe detects that it is not the first instance I want to bring the main window of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.