Reputation: 2936
I am using Mvp4g in gwt and i want to read properties file but if i add resourcebundle code its giving me exception java.lang.RuntimeException: Deferred binding failed for 'com.mvp4g.client.Mvp4gModule' (did you forget to inherit a required module?) but if i remove resourcebundle code its working fine . Is there any way to do that.
ResourceBundle rb = ResourceBundle.getBundle("com.opptin.client.socialsite");
String siteUrl = rb.getString("mode");
thanks
Upvotes: 0
Views: 2579
Reputation: 211
java.util.ResourceBundle
is not supported by the GWT compiler (if you want to know which Java APIs are emulated, have a look at the JRE Emulation Reference).
To use properties on the GWT client side, you can use com.google.gwt.i18n.client.Constants. An alternative is to pick JavaScript variables directly from the host page by com.google.gwt.i18n.client.Dictionary.
Upvotes: 1