Return status of java command