Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes This one is beginning to JAR me!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "This one is beginning to JAR me!!!" Watch "This one is beginning to JAR me!!!" New topic
Author

This one is beginning to JAR me!!!

Chut Murza
Greenhorn

Joined: Feb 06, 2003
Posts: 7
Hey all, my assignment is (well, at least i thought) complete and packed into a JAR and just about ready to go; but, I have a slight problem. I can't get the jar file to read from the database file that is embedded inside of itself, like it doesn't even exist. But it will work if the database file is in the same directory as the executable JAR... Now I have tried many combinations with the Classpath: attribute in my MANIFEST.MF file but still no luck... Any help will be tremendously appreciated!!!
Thanks,
Chuck
BJ Grau
Ranch Hand

Joined: Jul 10, 2001
Posts: 234
I would leave db.db outside of the jar file.
If you access it in the jar file you will have to treat it as a resource that you load with the ClassLoader, and then get it into a File on the file system since that is what Data is expecting to work with.
-BJ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: This one is beginning to JAR me!!!