public static native void exportStaticMethod() /*-{
$wnd.counter =
$entry(@mypackage.Class1Exposer::getClass1Counter());
}-*/;
No need to go so extreme - https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsJSNI#methods-fields
You can access static java methods from javascript as described in that link.