• 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

jar can't find file

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(I accidentally put this message into my last topic as a reply...).

ok, now there's another file path issue I am confused about: my app reads a file when loading. I have the file located in the directory tree in the right place, so that when I 2x-click on the jar file (the .jar file located in the classes directory), the app is run.

However, when I move this .jar file to another directory, say, the desktop, the app does not run (because it cannot find the needed file).

I guess I could make the path like so - "c:\java\myApp\..." - but will this work if I send the jar to a friend? And what about the idea that when the jar file is created it includes everything under the com directory? And what about Naomi?

so strange to me...hope I explained my soap opera clearly enough.
 
I have gone to look for myself. If I should return before I get back, keep me here with 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