Borrowed from Javanese Jawa, possibly from Sanskrit यव-द्वीप (yava-dvīpa, “island of barley”), used in reference to the coffee grown on Java and nearby islands since at least 1850. The programming language (initially called Oak) is a reference to java, the blend of coffee from the island.