Why Java is called Java
Java started as "Oak," named after a tree outside James Gosling's window at Sun. A trademark conflict forced a rename in 1995, and the replacement was picked over coffee — Java, the Indonesian coffee the team drank by the gallon. The steaming-cup logo made the accident official.
AI-assisted postDrafted with help from Claude, edited and fact-checked by Mart. See transparency policy →
Kaart van Java en Madura, 1850 — the island whose coffee named the language. Rijksmuseum, CC0.
Java is named after coffee, but only because the name everyone actually wanted was already taken. The language spent its first few years called Oak, after an oak tree that James Gosling could see from his office window at Sun Microsystems — a quiet, arboreal, slightly earnest name that suited a research project nobody outside Sun had heard of. When the project went commercial in 1995 and the lawyers ran the trademark search, Oak came back blocked by an existing technology company, and the team had to pick something else in a hurry. The replacement was chosen the way good replacements often are: in a meeting, over coffee, with the winning candidate proposed half as a joke. The steaming coffee cup that has been the language's logo ever since is the permanent record of that meeting.
The Green Project and the oak tree
Java began in 1991 as part of an internal Sun skunkworks called the Green Project. The team — James Gosling, Mike Sheridan, and Patrick Naughton — was not trying to build a language for the web, which did not yet meaningfully exist. They were chasing digital convergence: the idea that television set-top boxes, handheld devices, and home appliances were about to become programmable, and that they would need a language that could run safely on small, heterogeneous, networked hardware without being recompiled for each one. That requirement — run the same compiled code on wildly different devices — is the origin of the Java Virtual Machine and of the slogan the language is still known by, write once, run anywhere.
Gosling needed a language for this and built one. He named it Oak, after an oak tree that stood just outside his office window. As naming logic goes this is on the gentle end — no mythology, no acronym, no pun, just a tree the engineer could see while he worked. The first public demonstration of Oak came on 2 September 1992, in the form of the Star7, a handheld touchscreen device with an animated assistant — an early mascot that would later be rehabilitated as Duke, the gesturing cartoon figure that remains Java's official mascot. The set-top-box market the Green Project was built for never materialised the way Sun hoped. The web arrived instead, and Oak — renamed — turned out to be almost perfectly suited to it.
Oak was already taken
By 1995 Sun had decided to take the language public, repositioned around the browser rather than the set-top box, and the move from research project to product triggered the same boring, decisive process that has renamed half the software industry: a trademark search. Oak did not survive it. The name was already held by Oak Technology, a semiconductor company, and Sun was not going to ship a flagship product under a name it could not own. The tree had to go.
This is the same kind of collision that forced SQL's rename from SEQUEL when a British aerospace company turned out to own the word, and the same forces that later kept the JavaScript standard from being called JavaScript. A trademark conflict is one of the most common reasons a piece of software ends up with the name it has rather than the name its creators chose, and it is almost always invisible in the final product. Nobody using Java thinks about Oak Technology. But Oak Technology is the reason Java is called Java.
The name was chosen over coffee
What happened next is one of the better-documented naming meetings in software history, mostly because several of the people in the room have told the story. Product manager Kim Polese convened a brainstorming session to find a replacement, and it was, by the participants' own description, hours of chaotic free-association. The candidate list included Silk, Lyric, Pepper, NetProse, Neon, WebDancer, WebSpinner, and a number of others the participants declined to record for posterity.
The legal department was the filter. Of the dozens of names floated, only three came back clean from trademark review: Java, DNA, and Silk. Java had entered the running almost incidentally — someone reportedly suggested it while drinking a cup of Peet's Java coffee, offering it as an example of the kind of name that would never work. The team drank a great deal of coffee, Java is American slang for coffee, and the slang itself comes from the Indonesian island of Java, one of the great coffee-growing regions since the Dutch colonial plantations of the seventeenth century. Gosling is reported to have favoured Java over Silk, and Polese, as product manager, had the final call. She chose Java. The example of a name that would never work became the name.
The language emerged publicly in May 1995, with the first full public release, Java 1.0, following in January 1996. By then the coffee theme was locked in.
The steaming cup
The logo made the coffee accident official. Java's mark is a steaming cup of coffee — sometimes rendered as the stylised red-and-blue cup with the wordmark, sometimes as a simple line drawing of a mug with two curls of steam. It is one of the rare cases where a software logo is a literal, unembellished depiction of the thing the name refers to. Docker's whale is a visual joke layered on top of the longshoreman metaphor; Kubernetes' seven-spoked wheel smuggles in a Star Trek pun; Python's two-snake logo commemorates a meaning the name never had. Java's cup just shows you the coffee. The name means coffee and the logo is a coffee cup, and that is the whole of it.
The mascot is the older identity. Duke — the red-nosed, gesturing figure that predates the Java name and came from the Star7 prototype — survived the rename and is still the official Java mascot, his source code released by Sun under a BSD licence in 2006. The cup is the coffee story; Duke is the set-top-box story; both rode through the rename intact.
What the name had to carry
The detail that makes the coffee name fit better than the tree ever did is what the language was actually for. The Green Project's constraint — the same compiled program running on a set-top box, a phone, a desktop, and whatever appliance came next — meant Java could not compile to native machine code the way C did. Instead it compiled to bytecode, an intermediate instruction set, which a Java Virtual Machine on each device then executed. The JVM is the thing that makes write once, run anywhere true: the difficult, device-specific work moves into the virtual machine, and the program above it stays portable.
That architecture is why Java outlived the market it was built for. The set-top-box business collapsed, but a portable, sandboxed, network-safe language landed on the web at exactly the moment the web needed one, and later became the default language of enterprise servers and, through the JVM, of Android. A name chosen in a brainstorm over coffee ended up attached to one of the most-deployed runtimes in computing — which is a lot of weight for a word that started as an example of a name that would never work.
The naming deal that wasn't
There is one more thread worth pulling, because it connects directly to a language Java is constantly confused with. Later in 1995, Netscape was preparing to bundle Java into its browser, and to market the pairing it renamed its own in-house scripting language — built by Brendan Eich, unrelated to Java in every technical respect — to JavaScript, as part of a co-branding deal between Netscape and Sun. Sun's coffee-named language lent its hot brand to an unrelated language for marketing reasons, and the resulting confusion has run for three decades.
The irony is layered. Java was named after coffee because its real name was trademarked. JavaScript was named after Java because Java was, briefly, the hottest brand in software. The coffee that gave Java its name had nothing to do with either language, and the Java that gave JavaScript its name had nothing to do with JavaScript. The whole chain is a sequence of borrowed brands, each one a step further from anything the name actually describes. Sun ended up holding the JavaScript trademark — and so did Oracle, after it acquired Sun in 2009 — meaning the company behind the coffee-named language also owns the name of the language named after it. Naming in this corner of computing is less a system than a series of accidents that hardened into permanence.
A short close
Java is called Java because Oak was taken, because the replacement had to clear legal, and because one of the three names that cleared was the office slang for the coffee the team ran on. The tree outside Gosling's window named the language for its first four years; a semiconductor company's trademark ended that; a brainstorming session and a cup of Peet's finished it. The logo is a coffee cup because the name is coffee slang, which is the most honest logo-to-name relationship in the whole maritime-and-mythological menagerie of software naming. And the name went on to lend its borrowed heat to JavaScript, starting a confusion that has outlasted Sun, outlasted the set-top box, and shows no sign of resolving. The tree is forgotten, the coffee is in the logo, and the accident is the brand.
Read next


