Added a Java version