From: Henri Sara Date: Thu, 14 May 2009 07:04:06 +0000 (+0000) Subject: Use reflection in WidgetsetCompiler to remove GWT development version dependency. X-Git-Tag: 6.7.0.beta1~2896 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=96a58e53f1e1d0e79204b97bd0f1d4e48783aada;p=vaadin-framework.git Use reflection in WidgetsetCompiler to remove GWT development version dependency. svn changeset:7787/svn branch:6.0 --- diff --git a/src/com/vaadin/launcher/WidgetsetCompiler.java b/src/com/vaadin/launcher/WidgetsetCompiler.java index 9496fe0640..09dfce3f27 100644 --- a/src/com/vaadin/launcher/WidgetsetCompiler.java +++ b/src/com/vaadin/launcher/WidgetsetCompiler.java @@ -1,6 +1,6 @@ package com.vaadin.launcher; -import com.google.gwt.dev.GWTCompiler; +import java.lang.reflect.Method; /** * A wrapper for the GWT 1.6 compiler that runs the compiler in a new thread. @@ -41,7 +41,16 @@ public class WidgetsetCompiler { Runnable runCompiler = new Runnable() { public void run() { - GWTCompiler.main(args); + try { + // GWTCompiler.main(args); + Class compilerClass = Class + .forName("com.google.gwt.dev.GWTCompiler"); + Method method = compilerClass.getDeclaredMethod("main", + String[].class); + method.invoke(null, new Object[] { args }); + } catch (Throwable thr) { + thr.printStackTrace(); + } } }; Thread runThread = new Thread(runCompiler);