I have a
Java application that I run using the Eclipse
IDE. I need to export this such that my coworkers will be able to use it, preferably without having to install Eclipse as well. The problem is, when I export a jar file of the program, it does not work. I have identified two possible reasons why this may be so (I have been able to successfully distribute other applications that did not have these complicating factors):
1) The application links to another project in Eclipse. By default (am I missing a setting?), Eclipse does not include this when I export as a .jar file. The solution (workaround?) is to manually select this other project. This does not completely solve the problem, however, as the linked project uses a library .jar (the Saxon XSLT processor, FWIW) file which is not included in the application .jar no matter what I have tried.
2) The application reads from files contained in the project. This is fine in Eclipse, but not when I export - as these files (XSLT stylesheets, FWIW) are located inside the .jar file, and cannot be read (ie. (new File("Stylesheet.xsl")).exists() returns false).
How would I go about resolving these issues?