Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DB file on initial alone mode startup

 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am wondering what to do when the client is started for the very first time in alone mode with regard to the database file.

I would like to provide a default location for the user to choose in my connection dialog to connect to. At the moment it is blank and they have to specify the initial connection settings (a file location in essence).

I could include the database file in my jar, copy it out to the current working directory on very first startup (if it doesn't already exist) and have this location ready to go as a default.

Has anyone else done something similar?

Cheers, Jared.
 
Oliver Weikopf
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume that the db file is in the current working directory as a default. I assume this is the case as we have to include it in our submission jar at root level. If it's not there, I pop up a message asking the user to set the correct file.
I wouldn't include it in the runme.jar and copy it out. Sounds a bit weird to me.
 
Al Purvis
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jared

I agree that putting a copy of the database it into your run.me jar sounds odd.

What I did was to default to the relative location of the database that is to be packaged up for delivery.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!