Results 1 to 3 of 3
Thread: "First Launch" Event?
- 08-15-2009, 10:26 PM #1
Member
- Join Date
- Jul 2009
- Posts
- 7
- Rep Power
- 0
- 08-15-2009, 11:00 PM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 339
- Rep Power
- 5
You could do your one-time actions, then create a file in the application directory. Before your one-time actions, just check if the file exists. Something like this:
I left out the exception handling.Java Code:String userDir = System.getProperty("user.dir"); String fileName = "one-time.tst"; File testFile = new File(userDir + File.separator + fileName); if (!testFile.exists()) { doOneTimeInit(); testFile.createNewFile(); } ... // continue
- 08-15-2009, 11:03 PM #3
Member
- Join Date
- Jul 2009
- Posts
- 7
- Rep Power
- 0
Similar Threads
-
Java, Military Format using "/" and "%" Operator!!
By sk8rsam77 in forum New To JavaReplies: 11Last Post: 02-26-2010, 03:03 AM -
getDisplayLanguage returns "en" not "English"
By DD70 in forum New To JavaReplies: 6Last Post: 08-12-2009, 11:22 PM -
MoneyOut.println("It took you (whats wrong?>",year,"<WW?) years to repay the loan")
By soc86 in forum New To JavaReplies: 2Last Post: 01-24-2009, 06:56 PM -
Eclispe: "Launch failed. Binary not found"
By qwertyuiop23 in forum EclipseReplies: 1Last Post: 11-16-2008, 06:06 AM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks