Pretty much like this post, i’d like to check if my Java application was launched before.
Are there any standard ways in Java to do this or should i just create a file on the first launch, somewhere to indicate the application was launched before?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Actually the answer is pretty much the same on Java SE:
Check for a flag using the
PreferencesAPI (overview), if doesn’t exist, it’s the first start.After a successful start set that flag.