I have a JavaFx App, packaged and installed on my desktop, but I have a problem when I open two instances, the second one gives me a database blocking error. My idea is to launch the application only once, and if the user tries to open another copy of the app that is already open to show the original instance and not open another (prevent it from running twice if it is already open).
Sometime I see many application such as msn, windows media player etc that are single instance applications (when user executes while application is running a new application instance will not created).  In C#, I use Mutex class for this but I don't know how to do this in Java.
Energy conservation in General Relativity A question I'm struggling with is to prove or disprove that the automorphism group of a finite cyclic group must be cyclic. I think the statement is false but have not been able to come up with a counterexample.  Thank you for any assistance you can provide. Why there is "the" before some names but not others Is there a rule beyond the common "no the with proper nouns and names" for the following problem?     I saw the Empire State Building.      We went to the White House.      We saw the Golden Gate Bridge.   but     I went to Death Valley National Park.      I crossed Brooklyn Bridge. Hiding reputation and encouraging thinking time would improve the quality of answers on SO I've only been a member of SO for a couple of months but I must say that the site can be a bit daunting even for an experienced developer.  Part of this is because when users with very high reputations answer questions then it seems that everyone assumes that they have the right answer.  I don't want to go into the self-fulfilling nature of reputation increase for high reputation people.  But I think it is clear that people with high reputation scores get more upvotes () because people assume (usually accurately) that they are correct.    But if reputation was hidden on SO, at least for, say, the first hour after a question is asked then the probability of the best answer being upvoted the most would surely increase.  This might also require the hiding of the names of the answerers if they have very high reps!  As a second method of getting improved answers I would correlate the value of an answer (in terms of reputation gained) with the difficulty of the question.  And the simplest way to do that would be based on the time required for the question to be answered.  So if a question is answered within a minute then it is a 20% question (2 points per upvote), within 2 minutes a 40% question, within 5 minutes a 60% question and so on, on to say a 200% answer (20 points per upvote) on questions that have been hanging around for months.  This would encourage considered answers to new questions and tempt people into reducing the backlog - rather than encouraging people to sit on the 'newest questions' hoping for a gimme.  These two measures would incentivise people to answer the questions that no-one likes the look of and reduce the relative value of answering easy questions. If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English? Direct formula for area of a triangle formed by three lines, given their equations in the cartesian plane. I read this formula in some book but it didn't provide a proof so I thought someone on this website could figure it out. What it says is: If we consider 3 non-concurrent, non parallel lines represented by the equations : $$a_1x+b_1y+c_1=0$$ $$a_2x+b_2y+c_2=0$$ $$a_3x+b_3y+c_3=0$$ Then the area of the triangle that these lines will enclose is given by the magnitude of : $$\frac{det\begin{bmatrix}a_1 &amp; b_1 &amp; c_1\\a_2 &amp; b_2 &amp; c_2\\a_3 &amp; b_3 &amp; c_3\end{bmatrix}^2}{2C_1C_2C_3}$$ Where $C_1,C_2,C_3$ are the co-factors of $c_1,c_2,c_3$ respectively in the above matrix.  What I'm wondering is, where did this come from? And why isn't it famous? Earlier we had to calculate areas by finding the vertices and all but this does it in a minute or so and thus deserves more familiarity. Mouse sensitivity in 14.04 dissapeared If I go to "Settings -> Mouse &amp; Touchpad" in Ubuntu 14.04 all the options are gone! How can I bring them back? C# object references and Action types How to install Skype 4.3? Note: The legacy Skype for Linux application (v4.*) is now discontinued and was removed from Canonical’s partner repositories, so this question and its answers are obsolete. Please refer to  of our .  Skype 4.3 is just released with considerable improvements. As a regular Skype user I want to use the latest Skype on my Ubuntu 14.04, but there is no updates from Update Manager. Even in Skype website only Skype 4.3 is available only for Ubuntu 12.04. Is there anyway to use this latest Skype on Ubuntu 14.04 or how much we have to wait for the update? A term for words that change pronunciation with part of speech A surjective endomorphism (of a Noetherian ring) is injective. The problem is stated as follows:  "Let $R$ be a Noetherian ring and $\theta$ be a ring homomorphism from $R$ to $R$. Show that if $\theta$ is surjective then it is also injective."  Regardless of the right solution, I don't understand why is the following wrong:     We have $\theta: R\to R$. By the isomorphism theorem $R/\ker\theta\cong\operatorname{Im}\theta$. Since $\operatorname{Im}\theta = R$, it follows $\ker\theta =0$, so it's injective.   Harsh criticism will be appreciated. Thanks. How to read value of variable, where the name of variable is the value of another variable Choosing C++ debugger on linux After upgrading to 12.04 from 10.04, can't login to PHPMYADMIN Prove every odd integer is the difference of two squares I know that I should use the definition of an odd integer ($2k+1$), but that's about it.  Thanks in advance! Is there an upper limit to temperature in thermodynamics or statistical mechanics In many presentations of statistical mechanics where we have a system of particles having mass, such as the molecules of an ideal gas, the temperature is often equated to the average relative velocity of the particles. However no such velocity can exceed that of light. Is there therefore an absolute upper bound to temperature as well as an absolute zero? Why is the company email still "at stackoverflow" Comparing $\pi^e$ and $e^\pi$ without calculating them How can I  compare (without calculator or similar device) the values of $\pi^e$ and $e^\pi$ ? Present Perfect or simple past? Why don't we add a question with the same tag on multiple Stack Exchange sites?