Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar can't find file

 
Darren Brooks
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic