• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

This one is beginning to JAR me!!!

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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's exactly the same and completely different as this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic