Java began at Sun Microsystems in **1991** as a project called **Oak**, led by **James Gosling** with Mike Sheridan and Patrick Naughton. The stated goal was software for consumer electronics, specifically set-top boxes for interactive television, plus handheld remotes and other embedded appliances.
The problem it was meant to solve was real. These devices shipped with different processors, and the industry assumption was that software would migrate between them. Writing in C or C++ meant recompiling for each target, and for anything touching the operating system, rewriting the platform-specific code.
THE PROBLEM AS IT LOOKED IN 1991
┌───────────────────────────────┬───────────────────────────────┐
│ Devices used different CPUs │ Native binaries do not travel │
├───────────────────────────────┼───────────────────────────────┤
│ Set-top boxes, remotes, │ Recompile for every target, │
│ printers, anything embedded │ and rewrite the OS-specific │
│ │ parts entirely │
└───────────────────────────────┴───────────────────────────────┘The solution was to put a virtual machine between the source and the hardware, so that the platform-specific layer is written once per device rather than once per application.