aspose file tools*
The moose likes JNLP and Web Start and the fly likes Executable Jar again 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 "Executable Jar again" Watch "Executable Jar again" New topic
Author

Executable Jar again

Christopher Arthur
Ranch Hand

Joined: Mar 09, 2004
Posts: 149
Hi,

I'm having a similar problem as the other guy...
I have my application in a directory structure like this:

app/myjar.jar
app/dat/
app/src/
app/bin/

where the subdirectories contain various information that the program reads and writes during execution. If I don't launch the jar from the app directory, it seems to have a problem locating files. How can I fix this? Is there something to add to the manifest?

say I want to look at file app/dat/mydata.ser
In my code I might have something like: new FileReader("dat/mydata.ser");
and it doesn't work if I click on the jar from gnome.
Christopher Arthur
Ranch Hand

Joined: Mar 09, 2004
Posts: 149
Hmmm...well at little bit of experimenting tells me that when I'm running linux gnome, it seems like file paths extend from the user's home directory rather than directory that appears in the file browser window. This is a bit frustrating, because I bet that the same behavior wouldn't happen under windows. In order for my app to function, it definitely needs to read/write to the file system, so I guess I'll have to have an init screen where the user tells the app where to look. But I would like to avoid this since it makes the program less user friendly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Executable Jar again