]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use reflection in WidgetsetCompiler to remove GWT development version dependency.
authorHenri Sara <henri.sara@itmill.com>
Thu, 14 May 2009 07:04:06 +0000 (07:04 +0000)
committerHenri Sara <henri.sara@itmill.com>
Thu, 14 May 2009 07:04:06 +0000 (07:04 +0000)
svn changeset:7787/svn branch:6.0

src/com/vaadin/launcher/WidgetsetCompiler.java

index 9496fe06409b5581697b1f699bfcba171c844a09..09dfce3f2704aaae822fc712414fa1e1cbd87ca9 100644 (file)
@@ -1,6 +1,6 @@
 package com.vaadin.launcher;\r
 \r
-import com.google.gwt.dev.GWTCompiler;\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
@@ -41,7 +41,16 @@ public class WidgetsetCompiler {
 \r
             Runnable runCompiler = new Runnable() {\r
                 public void run() {\r
-                    GWTCompiler.main(args);\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