I was working on packaging my software and wondering how does the installation of JRE work. Does it simply copy the binaries on the local system and set the classpath accordingly or any other steps are done by the installer?
For windows the JRE binaries are stored in C:\Program Files\Java\jre7 can I copy this folder into some other machine(with same processor 32bit or 64bit) to make JRE work. If that is so then what are the environment variables that are needed to be set?
Yes, no problem. Unless you also want to register the .jar extension so that you can double-click them.
In that case check out the
ftypeandassoccommands. They can do that e.g. from within a batch file or installer.No need to set any environment variable.
Just make sure you qualify the path to javaw.exe (or java.exe) correctly when starting your application (e.g. through a batch file).