Archive: How to bundle a JRE?


How to bundle a JRE?
Hello!

My java application's requirement, is that i can't assume that the user has the proper jre installed, so i have to provide a proven one, in my nsis installation package.

I know there are script's that can check the existence of the specified jre, but that's not the right solution for me.

I want one in my installation folder, and the application would use this one only.

Can i do this?

Thanks


That's a question related more to Java rather than NSIS. It's up to Sun to decide if they want to allow you to do this. Technologically, it's very possible. So long as you don't include the browser (Firefox, Internet Explorer, etc.) plug-ins, it's just a matter of including javaw.exe, the DLL files and the JAR files.

But you should make sure you're licensed to do this first. Besides the legal issues, you should also consider security. If Sun fixes a security issues in Java, you will have to release a new version of your program.


I did this previously. All what you need is to make an excutable file (using JSmooth) to launch your application with the java.exe from the bin folder.

N.B. It is allowed legally to embed the VM in your application. just read the readme file in the main folder.