Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9071359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:53:27+00:00 2026-06-16T17:53:27+00:00

I have a JavaFX application that should check if it has already been launched

  • 0

I have a JavaFX application that should check if it has already been launched when you launch it (need only single instance running at the time). The problem is how to define it!

I have tried packing my JavaFX application into .exe file (or make an .exe launcher) that will be shown as the “MyProg.exe” process in the Windows task manager, not the “javaw.exe”. But it is not the solution (I’ve tried netbeans’ tools) because it adds jre to my application thus enlarging it from 1 mb. to 130+ mb. (can you help me with it?)

I’ve tried launch4j, but both launcher and .exe package starts javaw.exe to run my app. And when I check process manager and see 2 javaw.exe I don’t know, is it 2 instances of my app or just another app running?

I hope I described it clearand will be very thankful if somebody can help me with it!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:53:29+00:00Added an answer on June 16, 2026 at 5:53 pm

    Judging by your approach it seems that you are already found a way to get a list of Windows’ processes from Java. In this case you can use one of the next solutions:

    1. Take other process info into account. E.g. command line or window title. Windows command line can be retrieved using wmic.exe PROCESS command and for Unix-bases systems by ps -Af.
    2. When your program starts store it’s process id in the registry or file in homedir. When another instance starts it should check that value and if process with that id alive then just exit.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that contains two stages which should be shown on two
I have a Java Swing application, that has many JTextFields and a datamodel. When
I have a JSF ManagedBean which has a property that should be set by
I have this easy little form in my JavaFX application. I want to use
I have just explore javaFX. I am now programming modul based application by netBeans
I have just started digging into JavaFX and have a requirement that I am
I have a thread in my screen recording application that won't cooperate: package recorder;
I am working with GWT and have 4 Service Implementations that need a PersistenceManagerFactory.
I'm writing a very simple application in Javafx where there is a single button
I have an application where i need to write some data to the serial

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.