Now works with java