JDK – No Install Needed

I don’t like the whole concept of installers for my development tools like JDK, Eclipse, Netbeans, etc. I just keep a batch/shell script to setup my environment variables for JAVA_HOME, PATH and aliases.

So, on Windows, updating JDK involves installing new version of JDK and then copying what I need and then uninstall it. I don’t like those registry entries and files installed in C:\Windows\System32, etc.

Recently I read a stackoverflow entry that gave some insight on JDK packaging. So I wrote a small batch script to do it all. Only quirk is that, there is a small difference in Pre 7.0 packaging from the 7.0 and above, so for now I need to keep 2 scripts. Scripts need 7z, that is a free tool and could be downloaded from here.

These scripts can be run as:


And now on to the actual the code: