Results 1 to 3 of 3

Thread: Single instance

  1. #1
    Join Date
    Oct 2009
    Posts
    88
    Rep Power
    0

    Default Single instance

    How to make a java class to run single instance in the system

    i.e
    if the a program started execution then that same program should not run in same system before it is stoped

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,307
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by anilkumar_vist View Post
    How to make a java class to run single instance in the system

    i.e
    if the a program started execution then that same program should not run in same system before it is stoped
    Open a socket on a certain port. Before doing so try to connect to that socket; if it succeeds there's another instance of your program running.

    kind regards,

    Jos

  3. #3
    Join Date
    Oct 2009
    Posts
    88
    Rep Power
    0

Similar Threads

  1. object and instance
    By anurag in forum New To Java
    Replies: 1
    Last Post: 05-14-2010, 08:51 PM
  2. Find instance that owns instance?
    By Addez in forum New To Java
    Replies: 2
    Last Post: 04-04-2010, 03:36 PM
  3. instance fields?
    By search4survival in forum New To Java
    Replies: 3
    Last Post: 04-03-2010, 05:10 PM
  4. instance access
    By sujaiyer85 in forum Advanced Java
    Replies: 2
    Last Post: 04-23-2008, 07:37 AM
  5. New Instance for SWT
    By srinivasa_v in forum SWT / JFace
    Replies: 1
    Last Post: 08-08-2007, 01:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •