Trying to built-in JSNI support to a legacy GWT project. I've added simple JSNI alert function which is called from button's onclick handler -
public static native void JSAlert(String msg)
/*-{
$wnd.alert(msg);
}-*/;
public class JSNITestCommandHandler extends AbstractEventListener<JSNITestCommand> {
@Override
public void execute(JSNITestCommand event) {
JSAlert("TEST JS ALERT");
}
}
When I click on the button in the browser, it shows "Executing..." for about 10 seconds, and then error message appears -
------------- SOMETHING WENT WRONG ------------- com.gotapi.hcsapplication.client.XLcmApplicationClient.JSAlert(Ljava/lang/String;)V
java.lang.UnsatisfiedLinkError: com.gotapi.hcsapplication.client.XLcmApplicationClient.JSAlert(Ljava/lang/String;)V
What to do to fix this?