Greetings,
It seems that under the Linux GUI (Gnome) a
Java .jar cannot read external files that are in the same directory (relative path) as the .jar. This is because when running anything in gnome, the current directory defaults to $HOME so tries to find the files there. Under Windows and Mac, this does not happen and the .jar can read external files perfectly. I can also run java -jar ProgName.jar from the linux command line and it runs perfectly. How do I get around this problem with running in the Linux GUI? Here are some of my stipulations.
1. I do not want to put my external files in a jar
2. I want to access these files with a path relative to the jar
3. I want to make it easy for the user to download and run
Should I just not worry about a jar file, and just distribute the class files instead? You may have a look at
http://adornthetruth.com/nikamo to get a better idea of the program I am working on. I currently distribute it as a zip file that has to be unzipped. In the zip file is the jar plus a folder containing the external files I want the jar to read in.
-Kevin