Java method invoked by js