I'd like to create a detached/offline Java setup on Windows to roll out to other systems and VMs. I know that some applications bundle Java within them, but I was wondering if I can also create a Java installation that I can port to another system. i.e. I don't want to install Java from the Oracle installer, or from chocolatey or other package managers. I want to get a vanilla Java setup folder from one system, and then port to another system or VM, and ideally into a different folder from the default (
The main obvious considerations are PATH and registry. Certainly, I would add the folder containing
java.exe etc to the PATH. Would that be sufficient? Would a
.jar file then use those binaries, or would I further need to add registry information as well as the PATH?
How would we create a completely portable version of Java in this way?