Despite public comments by Steve Jobs that "Java’s not worth building in [to the iPhone]", it turns out that Apple did just that by using an ARM-based CPU that supports Java natively. Programmers cannot (yet) take advantage of this, but Apple could, if they wanted, ship a software upgrade to enable it.
Shortly after the iPhone went on sale, hardware enthusiasts started tearing into them to see what made them tick. They found that the iPhone is using an ARM1176JZF-based processor, probably the Samsung S3C6400 that operates at 667MHz. This chip sports an embedded Java acceleration engine called Jazelle. From the ARM web site:
ARM processors traditionally support two instruction sets; ARM state, with 32-bit instructions and Thumb state which compresses the most commonly used instructions into 16-bit format. The Jazelle technology extends this concept by adding a third instruction set, Java bytecode, to the capability of the processor, together with a new Java state.
ARM licenses the Jazelle Java Technology Enabling Kit (JTEK) to companies like Samsung and Nokia for use on phones and Blu-ray players. Jazelle provides high performance Java in up to 8x less RAM compared to software only approaches. Thanks to its recent acquisition of SavaJe, one of the licensees of this technology is Sun Microsystems (you may recall that the SavaJe portfolio forms the basis of JavaFX Mobile).
Another cool feature of Jazelle is its Multitasking Virtual Machine (MVM) technology. Desktop Java developers have been asking for this for years. Simply put, it's a way to optimize running several Java applications at once with minimal overhead. Instead of the JVM starting up when the user plays a game or invokes some other Java application, the MVM is designed to start up when the device is switched on, run continuously and be transparent to the user. Each application is executed as if it were running on its own virtual machine, and isolated from the other applications.
Now, if Apple can just get over its anachronistic "Java is heavyweight" beliefs, then small, efficient, hardware-accelerated Java games and multimedia for your iPhone could be just a software upgrade away.