Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Java class file
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Magic Number=== Class files are identified by the following 4 [[byte]] [[header (computing)|header]] (in [[hexadecimal]]): <code>CA FE BA BE</code> (the first 4 entries in the table below). The history of this [[Magic number (programming)|magic number]] was explained by [[James Gosling]] referring to a restaurant in [[Palo Alto, California|Palo Alto]]:<ref>[http://radio-weblogs.com/0100490/2003/01/28.html James Gosling private communication to Bill Bumgarner]</ref> <blockquote> "We used to go to lunch at a place called St Michael's Alley. According to local legend, in the deep dark past, the [[Grateful Dead]] used to perform there before they made it big. It was a pretty funky place that was definitely a Grateful Dead Kinda Place. When [[Jerry Garcia|Jerry]] died, they even put up a little Buddhist-esque shrine. When we used to go there, we referred to the place as Cafe Dead. Somewhere along the line it was noticed that this was a HEX number. I was re-vamping some file format code and needed a couple of [[Magic number (programming)|magic numbers]]: one for the persistent object file, and one for classes. I used CAFEDEAD for the object file format, and in [[grep]]ping for 4 character hex words that fit after "CAFE" (it seemed to be a good theme) I hit on BABE and decided to use it. At that time, it didn't seem terribly important or destined to go anywhere but the trash-can of history. So CAFEBABE became the class file format, and CAFEDEAD was the persistent object format. But the persistent object facility went away, and along with it went the use of CAFEDEAD - it was eventually replaced by [[Java remote method invocation|RMI]]." </blockquote>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)