B4J Question Only one instance of an app

Discussion in 'B4J Questions' started by Bruce Axtens, Mar 3, 2015.

  1. Bruce Axtens

    Bruce Axtens Active Member Licensed User

    How do I make sure that there's only ever one instance of my B4J app running.VB6 had
    Is there anything equivalent in B4J?
  2. Erel

    Erel Administrator Staff Member Licensed User

    If you are only targeting Windows then you can use Launch4j to convert the jar file to an exe file and also allow a single instance of it:


    A cross platform solution is more difficult. You can open a specific port with ServerSocket and if it fails then the app is already open.
    Bruce Axtens likes this.
  3. Bruce Axtens

    Bruce Axtens Active Member Licensed User

    Thanks, Erel. Just what I'm looking for.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice