Work from java class