Windows does the same thing as OS X. You can do the same on Linux, even on the console over there (using binfmt_misc, see ) without a desktop environment.
For as long as I can remember Java installed an entry in HKEY_CLASSES_ROOT for .jar files. On my machine it's currently set up to run
"C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %*
Java does try to get that to work by default, though.