0

I'm debugging and developing a GWT module through Development Mode. While starting DM I get the following JSNI error: "Missing qualifier on instance method". But, when I compile it, I get no compilation errors. Is it a DM issue or just my fault?

Tip: This is the function I'm trying to access inside native method:

public static native void fbLogin () /*-{
    @pack1.pack2.pack3::someMethod(Ljava/lang/String;)(param);
}-*/;

Thanks!

2 Answers2

6

You have either, to declare someMethod as static or to pass the instance object to your jsni block:

public static native void fbLogin (pack3 instance) /*-{
   instance.@pack1.pack2.pack3::someMethod(Ljava/lang/String;)(param);
}-*/;
Manolo Carrasco Moñino
  • 9,723
  • 1
  • 22
  • 27
1

You are missing static in the method which JSNI function is calling, the Java method should be

public static void someMethod(String param){
}
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Prashant
  • 31
  • 3