I just downloaded the Java SDK/JDK versions 5 and 6, and I just need the development tools (and some libraries) contained in the installation packages, I don't need to perform an installation and that's why I was only looking for a zip package at first (for Windows there is only an exe installation file), I only need to extract the contents of the installation packages, I think this can be done from the command line but so far I haven't found how to do this (I already considered WinRar and 7-Zip, but I really want to find how to do it without using these tools)
Have you done this before and how?
Maybe you can try Universal Extractor. The site looks legit, but I haven't tried it myself.
You can do the installation once and then zip up the installed stuff placed under \Programs\Java.
This can be unzipped elsewhere later and used as a JDK in most IDE's without needing a full reinstall (but then Windows does not know about it)
I've created cygwin script to do that: https://gist.github.com/4ndrew/f9dca61cedf0e8340b54
You can extract both JDK 1.5 and 1.6 from .exe files, using the Universal Extractor (really a great tool). But don't forget to convert all *.pack files (compressed with Pack200 format) into corresponding *.jar files, in order to obtain a full working environment. You can use the unpack200.exe command provided in the JDK itself.
I use 7-zip to do that. It seems to handle that installer/self-extracting executables nicely.
This is e-egiazarov's script, modified to use
unpack200.exe
from the JDK archive and also to remove the pack file after conversion.