I wrote a Java software. Now I want to copy it on a USB key and make it able to run in a stand-alone way on computers that probably don't have JVM. Is this possible?
5 Answers
Sure there is. Don't listen to the spoil sports. launch4j lets you bundle your executable jar, any dependency jars, and even a JRE into an executable file.
There is, unfortunately, no way to make one cross-platform solution, because JRE implementations themselves are not cross-platform.

- 1,265
- 7
- 16
For each computer/architecture you want to run your java code on you need a JVM.
You could provide several JVM's next to your java code for different architectures.
Or you can create an executable for a specific platform (such as MS Windows) see How do I create an .exe for a Java program?
Wikipedia has a collection of Portable Application Creators. If that's an overkill, just use a private JRE.
If you need to save space on your USB key, have a look at this 7-Zip SFX trick (works for both private JRE and Excelsior JET.)

- 3,233
- 1
- 20
- 17