Moved code to java realm.