yohhoyの日記

技術的メモをしていきたい日記

0xCAFEBABE

Javaクラスファイル(拡張子class)のマジックナンバー 0xCAFEBABE の由来について。

This reply is the actual answer to the question, supplied by Patrick Naughton, one of the original members of the team that eventually produced Java. I quoted Patrick in my JavaWorld article.

Strangely enough the magic number for .class files was chosen long before the name Java was ever uttered in reference to this language. We were looking for something fun, unique and easy to remember. 0xcafebabe was better than the second runner-up, 0xdeadbabe. :-)

It is only a coincidence that the oblique reference to the cute barristas at Peet's Coffee was foreshadowing for the name Java.

Why CAFEBABE? - A discussion thread from comp.lang.java