File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JNLP and Web Start and the fly likes jar can't find file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "jar can Watch "jar can New topic

jar can't find file

Darren Brooks
Ranch Hand

Joined: Dec 29, 2005
Posts: 32
(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 agree. Here's the link:
subject: jar can't find file
It's not a secret anymore!