SpoutDev/Spout — Issue #980: Utilize byte code patching to upgrade/downgrade minecraft.jar
Author: Wulfspider
Created: 2011-11-20 00:26:08+00:00
State: open
Labels: Launcher, Suggestion

What we could do too, is do that whole json idea with the compatible versions/builds all stored in there, and also what version of LWJGL it uses

So that if notch ever updates, it could byte patch those too

http://www.maclovin.de/2010/02/how-to-patch-binary-files-with-java/
http://www.maclovin.de/wp-content/uploads/2010/02/BinaryPatcher.java

http://sourceforge.net/projects/javaxdelta/

Basically, we'd have patch files and known checksums of each jar. We could also disable the updating if an unknown jar is detected to prevent a white screen of death.

Also, Amazon stores the MD5 hash for files in the header information as the ETag, so we could simple check the header without even have to download the file.

ETag:	"3820d222b95d0b8c520d9596a756a6e6" = minecraft.jar for 1.0