Your example works, The issue is that I don't load the class from a classloader, I'm using BCEL to read the .class and access the GWT_VERSION_NUM field, so static initializer is not executed.
I now fallback to reading the About.properties if present, this fix my version-detection issue Cheers, Nicolas On Thu, Feb 5, 2009 at 8:13 PM, Scott Blum <sco...@google.com> wrote: > Nicolas, I can't reproduce the issue you're seeing. Do you have a weird > classloader setup? Or is it possible the code you have that references > About needs to be recompiled? Try the following test.. create a Main.java > in your GWT install directory and run the following commands. > Main.java: > > import com.google.gwt.dev.About; > > public class Main { > public static void main(String[] args) { > System.out.println(About.GWT_NAME); > System.out.println(About.GWT_SVNREV); > System.out.println(About.GWT_VERSION); > System.out.println(About.GWT_VERSION_NUM); > } > } > > Command line: > > C:\gwt-windows-1.6.0>"%JAVA_HOME%\bin\javac.exe" -cp gwt-dev-windows.jar > Main.java > > C:\gwt-windows-1.6.0>"%JAVA_HOME%\bin\java.exe" -cp .;gwt-dev-windows.jar > Main > Google Web Toolkit > 1...@4621m > Google Web Toolkit 1.6.0 > 1.6.0 > > C:\sandbox\gwt-windows-1.6.0> > > This seems correct to me. > > On Thu, Feb 5, 2009 at 3:51 AM, nicolas de loof > <nicolas.del...@gmail.com>wrote: > >> I just notice the "About" class has not the GWT_VERIOSN_NUMBER set. >> Seems the code expects some String replacement for @gwt_vers...@. >> >> I'm using About.GWT_VERSION_NUM constant in gwt-maven-plugin to detect the >> GWT version used when user provides it's own implementation. >> >> Cheers, >> Nicolas >> > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---