+++ /dev/null
-package com.vaadin.launcher;\r
-\r
-import java.lang.reflect.Method;\r
-\r
-/**\r
- * A wrapper for the GWT 1.6 compiler that runs the compiler in a new thread.\r
- * \r
- * This allows circumventing a J2SE 5.0 bug (6316197) that prevents setting the\r
- * stack size for the main thread. Thus, larger widgetsets can be compiled.\r
- * \r
- * This class takes the same command line arguments as the\r
- * com.google.gwt.dev.GWTCompiler class. The old and deprecated compiler is used\r
- * for compatibility with GWT 1.5.\r
- * \r
- * A typical invocation would use e.g. the following arguments\r
- * \r
- * "-out WebContent/VAADIN/widgetsets com.vaadin.terminal.gwt.DefaultWidgetSet"\r
- * \r
- * In addition, larger memory usage settings for the VM should be used, e.g.\r
- * \r
- * "-Xms256M -Xmx512M -Xss8M"\r
- * \r
- * The source directory containing widgetset and related classes must be\r
- * included in the classpath, as well as the gwt-dev-[platform].jar and other\r
- * relevant JARs.\r
- */\r
-public class WidgetsetCompiler {\r
-\r
- /**\r
- * @param args\r
- * same arguments as for com.google.gwt.dev.Compiler\r
- */\r
- public static void main(final String[] args) {\r
- try {\r
- // run the compiler in a different thread to enable using the\r
- // user-set stack size\r
-\r
- // on Windows, the default stack size is too small for the main\r
- // thread and cannot be changed in JRE 1.5 (see\r
- // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6316197)\r
-\r
- Runnable runCompiler = new Runnable() {\r
- public void run() {\r
- try {\r
- // GWTCompiler.main(args);\r
- Class<?> compilerClass = Class\r
- .forName("com.google.gwt.dev.GWTCompiler");\r
- Method method = compilerClass.getDeclaredMethod("main",\r
- String[].class);\r
- method.invoke(null, new Object[] { args });\r
- } catch (Throwable thr) {\r
- thr.printStackTrace();\r
- }\r
- }\r
- };\r
- Thread runThread = new Thread(runCompiler);\r
- runThread.start();\r
- runThread.join();\r
- System.out.println("Widgetset compilation finished");\r
- } catch (Throwable thr) {\r
- thr.printStackTrace();\r
- }\r
- }\r
-}\r
--- /dev/null
+package com.vaadin.tools;\r
+\r
+import java.lang.reflect.Method;\r
+\r
+/**\r
+ * A wrapper for the GWT 1.6 compiler that runs the compiler in a new thread.\r
+ * \r
+ * This allows circumventing a J2SE 5.0 bug (6316197) that prevents setting the\r
+ * stack size for the main thread. Thus, larger widgetsets can be compiled.\r
+ * \r
+ * This class takes the same command line arguments as the\r
+ * com.google.gwt.dev.GWTCompiler class. The old and deprecated compiler is used\r
+ * for compatibility with GWT 1.5.\r
+ * \r
+ * A typical invocation would use e.g. the following arguments\r
+ * \r
+ * "-out WebContent/VAADIN/widgetsets com.vaadin.terminal.gwt.DefaultWidgetSet"\r
+ * \r
+ * In addition, larger memory usage settings for the VM should be used, e.g.\r
+ * \r
+ * "-Xms256M -Xmx512M -Xss8M"\r
+ * \r
+ * The source directory containing widgetset and related classes must be\r
+ * included in the classpath, as well as the gwt-dev-[platform].jar and other\r
+ * relevant JARs.\r
+ */\r
+public class WidgetsetCompiler {\r
+\r
+ /**\r
+ * @param args\r
+ * same arguments as for com.google.gwt.dev.Compiler\r
+ */\r
+ public static void main(final String[] args) {\r
+ try {\r
+ // run the compiler in a different thread to enable using the\r
+ // user-set stack size\r
+\r
+ // on Windows, the default stack size is too small for the main\r
+ // thread and cannot be changed in JRE 1.5 (see\r
+ // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6316197)\r
+\r
+ Runnable runCompiler = new Runnable() {\r
+ public void run() {\r
+ try {\r
+ // GWTCompiler.main(args);\r
+ // avoid warnings\r
+ System.setProperty("gwt.nowarn.legacy.tools", "true");\r
+ Class<?> compilerClass = Class\r
+ .forName("com.google.gwt.dev.GWTCompiler");\r
+ Method method = compilerClass.getDeclaredMethod("main",\r
+ String[].class);\r
+ method.invoke(null, new Object[] { args });\r
+ } catch (Throwable thr) {\r
+ thr.printStackTrace();\r
+ }\r
+ }\r
+ };\r
+ Thread runThread = new Thread(runCompiler);\r
+ runThread.start();\r
+ runThread.join();\r
+ System.out.println("Widgetset compilation finished");\r
+ } catch (Throwable thr) {\r
+ thr.printStackTrace();\r
+ }\r
+ }\r
+}\r