From 96a58e53f1e1d0e79204b97bd0f1d4e48783aada Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Thu, 14 May 2009 07:04:06 +0000 Subject: [PATCH] Use reflection in WidgetsetCompiler to remove GWT development version dependency. svn changeset:7787/svn branch:6.0 --- src/com/vaadin/launcher/WidgetsetCompiler.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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); -- 2.39.5