Frequently Asked Questions
OK, so I'm making some of these up. But some of them were real questions. Can you tell
Seriously though, since its release in Summer 2004 there have been very few issues:
basically, One-JAR just works. The recent release has extended One-JAR to work with frameworks
such as SpringFramework and Guice which did have specific requirements of the ClassLoader that
One-JAR was not supplying.
Q: My application reads its configuration out of a file. How do I make it into a One-JAR?
A: Naughty application! But many are. Put your file into the
One-JAR archive (e.g.
config.properties), then add the following line to the
The first time you run the One-JAR archive, this file will be expanded. If you update the
archive, it will be overwritten on the next expansion. The expansion mechanism can handle
both files and folders.
Q: I don't understand what One-JAR is doing?
A: Turn on diagnostics using
java -Done-jar.verbose=true -jar <one-jar.jar>
Q: But I still can't understand why my application is failing!
A: Look at the
JarClassLoader.java file which is distributed with the downloads.
It holds all the secrets.
Q: Where's the source code?
A: The essential source code is in the distribution. The extended source code and a full Eclipse development
environment is located at the SourceForge CVS site with anonymous access (no password required):
This site contains a master Ant
build.xml file which can rebuild the distribution and perform extensive regression testing,
so if you want to submit a patch it is highly recommended that you (a) add a new test for the patch, and (b) run the existing tests.
Q: Can I modify the source code for my application?
A: Yes, the One-JAR license expressly permits this.
The only requirement is that you must redistribute the copyright notice and disclaimer contained in the license.
There are different ways you can satisfy this requirement, for example:
- Include the One-JAR license agreement inside your One-JAR archive. This is automatic when
you use the Ant and Maven2 build tools, which put the license in
- Include the One-JAR license agreement in your documentation
- Expand the One-JAR license agreement into a directory when your application is executed
- Put a button on your GUI installer which displays the One-JAR license
Our goal with this requirement is to (a) ensure that you tell your customers who created One-JAR, so
that they can find out more about it and (b) make it clear to your customers that we are
providing no warranty or support for the One-JAR code, either modified or unmodified.
Q: Should I send my modifications back to you?
A: Absolutely. Send patches and they will be integrated into future releases, and tested for regressions.
Better still, become a contributor to the One-JAR community.
Bugs and Support
There will always be some issues with any software. If you find one please
report it to the SourceForge Bug Tracker.
Better still, fix it and submit a patch and it will get integrated into the next release.
Please submit new FAQ questions (and answers if you have them) to the SourceForge Discussion List. The
growing One-JAR community is good at supporting itself. But please don't expect a real-time response: One-JAR
really is Open-Source, you should be able to build and support yourself with ease. If you find yourself
struggling, please contact us for professional support