permaculture playing cards*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes how to use new Data(dbName) to open db.db in jar? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "how to use new Data(dbName) to open db.db in jar?" Watch "how to use new Data(dbName) to open db.db in jar?" New topic
Author

how to use new Data(dbName) to open db.db in jar?

Vince Zhang
Greenhorn

Joined: Apr 17, 2002
Posts: 2
In local mode, if I put db.db in jar(/suncertify/db/db.db), then call new Data(String dbName) to create an instance of Data, what dbName should I input?
Thanks
Matt Ghiold
Ranch Hand

Joined: Feb 24, 2002
Posts: 213
You can't open a file inside of a jar file.
You need to have your db file live outside of your jar file.
*hint* I believe sun allows a command line parameter of the db file location


-Matt<br /> SCJP2<br /> SCJD
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to use new Data(dbName) to open db.db in jar?
 
Similar Threads
Data constructor doubt
Mark: Command lines
PLS help me about file access!!
Really need help with this one!!!
Question on db.db