BackgroundThe existence of Java on a device has been used as a device fingerprint element since fingerprinting has existed. While Java has been on the decline on clients given the releast of HTML4, there is still enough installations to use it as an element in the device fingerprint.

How It WorksThis device fingerprint simply queries the javaEnable property and returns true all false. While the fingerprint is simple, users don't tend to change the install state of Java frequently so it tends to be a very stable data point in the device fingerprint.

Entropy Estimate: 1.0 bits

CodeThe javascript function below fingerprints the existence of Java on the device. You may also download this code here: fp_java.zip

Code

function fingerprint_java() {

"use strict";

var strOnError, strJavaEnabled, strOut;

strOnError = "Error";

strJavaEnabled = null;

strOut = null;

try {

if (navigator.javaEnabled()) {

strJavaEnabled = "true";

} else {

strJavaEnabled = "false";

}

strOut = strJavaEnabled;

return strOut;

} catch (err) {

return strOnError;

}

}

ValidationUnlike other code on the Internet we do everything possible to verify our code for you. In order to minimize problems and maximize compatibility this code has been verified with JSLint and has been extensively tested with over 1100 OS/Browser combinations using BrowserStack.