Calling Java From The Page
plugins and media 1996 deadNetscape let page JavaScript reach straight into Java, calling System.out and opening AWT windows as if the applet runtime were part of the language.
In 2026: Dead. LiveConnect bridged JavaScript and the Java plugin both ways, so a script could write java.lang.System.out.println or pop a java.awt.Frame. Browsers removed plugin Java around 2015 and the whole bridge went with it. The demo finds no java object and says so. For a while, though, the browser really did contain a second entire language.
Where it came from: Netscape LiveConnect, JavaScript to Java bridge, Navigator 3, 1996. Removed with plugin Java around 2015. Wikipedia ↗
<button onclick="callJava()">Print from Java</button>
<p id="out"></p>
<script language="JavaScript">
function callJava() {
var out = document.getElementById("out");
try {
// Reach out of JavaScript and into the Java runtime, 1996 style.
java.lang.System.out.println("Hello from Java, via the page.");
var v = java.lang.System.getProperty("java.version");
out.innerHTML = "Java answered. Version: " + v;
} catch (e) {
out.innerHTML = "No java object. LiveConnect and the plugin are gone: " + e;
}
}
</script>