Article View: borland.public.jbuilder.java.language
Article #7333Re: ?? Prevent starting a Programm twice???
From: dnoyeB
Date: Wed, 27 Jun 2001 12:40
Date: Wed, 27 Jun 2001 12:40
28 lines
1858 bytes
1858 bytes
You can alternately check the running processes for a processes that carries your name. "Joi Ellis [TeamB]" <joi@aravox.com> wrote in message news:3b39d418_1@dnews... > Peter Lustig <kschnepp@web.de> wrote: > > > I am searching for an easy way to prevent starting the same Programm manifold on a Computer. > > Have the program open a ServerSocket on a specific port. If it is able to > open the port, then it's the only instance of the program running. > If it can't open the socket, either there are multiple copies of the program > running, or something else is using the port. You can make the port user > configurable if you need to, as long as the program writes the new port number > someplace permanent > > > -- > Joi Ellis (TeamB) http://www.teamb.com/ > No direct email, please. > For best results, post on news server newsgroups.borland.com! > Newsgroup Info: http://www.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<3b39da80$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b398972$1_1@dnews> <3b39d418_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,5fc10420f14b88fa X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-27 06:10:55 PST From: "dnoyeB" <lamont_gilbert @ rigidsoftware.com> Newsgroups: borland.public.jbuilder.java.language References: <3b398972$1_1@dnews> <3b39d418_1@dnews> Subject: Re: ?? Prevent starting a Programm twice??? Date: Wed, 27 Jun 2001 08:40:30 -0400 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 63.68.196.49 Message-ID: <3b39da80$1_1@dnews> X-Trace: dnews 993647232 63.68.196.49 (27 Jun 2001 06:07:12 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews