Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A Java old timer reminisces - Oak, 0XCAFEBABE, Green Threads, RuntimeException (suprgeek.wordpress.com)
26 points by suprgeek on Aug 4, 2009 | hide | past | favorite | 5 comments


"What is the meaning of the name 'RuntimeException' ? Why is the class so named? Think about this for a minute ... ALL exceptions are thrown at runtime right?"

That has been bothering me subconsciously for years! It is very nice to have the explanation for the name:

"Recall that Java has a class called as the “Runtime” class – an abstracted representation of the underlying Java Virtual Machine that allows us to add hooks and get information. So the simple answer to “What is the meaning of the name RuntimeException” is “It is an exception thrown by the Runtime itself” rather than any particular piece of code."


While I'm not a Java developer, I was trained on Java in the late 90s and knew about Oak, Green Threads, and the RuntimeException class. 0xCAFEBABE caught me off-guard, though, because I have always known that as the magic number designating Mach binaries on OS X. Anyone know what the connection might be?


It's quite possible there is none, and they're independent "inventions". There aren't that many four-letter words composed of hex digits (by my reckoning, the only common ones are BABE, BEAD, BEEF, CAFE, DADA, DEAD, DEAF, DEED, FACE, FADE and FEED), and stringing two together to get a magic number must be a popular pastime. In fact, Wikipedia has a list of them at http://en.wikipedia.org/wiki/Magic_number_%28programming%29 under "magic debug values", which demonstrates that 1337 can get you some more.


In the late 90s, I cracked a shareware but didn't do it too well, it was a quick and dirty jump flip; the developer was testing for cracking attempts, and as soon as I left the debugger and stepped back into ring-3 I notice my Windows start button now read "0xDEADBEEF".


It takes some courage to admit that on a site populated by software entrepreneurs.

(I'm not condemning you -- but I do think that cracking shareware is the computer equivalent of meticulously planning how to steal coins from the collection plate at a slum church.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: