Reputation: 63
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?
Upvotes: 6
Views: 389
Reputation: 3155
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.)
Upvotes: 0
Reputation: 6266
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?
Upvotes: 0
Reputation: 1265
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.
Upvotes: 4
Reputation: 8640
i think best way will be if you will try to fit jvm on that usb stick.
Upvotes: 1