ERLEDIGT
NEIN
NEIN
ANTWORTEN
2
2
ZUGRIFFE
1124
1124
EMPFEHLEN
-
Ich habe mit GWT ein einfaches Beispiel erstellt (bestehend aus 5 GUI-Elemente). Als GWT-Projekt lässt die Anwendung starten. Jetzt versuche ich diese in ein anderes Projekt zu importieren. Das Problem ist, dass unsere Struktur anders als bei dem GWT-Projekt ist. Kann mir jemand sagen, was und wo geändert werden muss, damit ich über das Kontextmenü -> Debug as -> Google Web Application diese starten kann. Ich bin soweit gekommen, dass dieser Eintrag im Kontextmenü erscheint, allerdings kriege ich folgende Fehlermeldung bei der Ausführung:
Wenn ich stattdessen kompilieren will, bekome ich eine java.lang.NullPointerException ohne weiterere Informationen.Could not find any host pages in projekt
-
Du musst die mal die .project ansehen
Wesentlich schöner ist es allerdings das compilieren diekt in den build process mit einzubauen:
Code xml:1 2 3 4 5 6 7 8 9 10 11 12 13
<path id="gwt.compile.class.path"> <pathelement location="${build.src}" /> <pathelement path="${build.gwt.src}" /> <fileset dir="${build.lib.runtime}" id="compile.lib"> <include name="*.jar" /> </fileset> <fileset dir="${project.lib.compile}" id="runtime.lib"> <include name="*.jar" /> </fileset> <fileset dir="${project.lib.gwt}" id="gwt.lib"> <include name="*.jar" /> </fileset> </path>
Code xml:1 2 3
<target name="compileGWT"> <gwtCompile module="com.my.package.Module" classpathref="gwt.compile.class.path" output="war" /> </target>
Code xml:1 2 3 4 5 6 7 8 9 10 11 12 13
<path id="gwt.compile.class.path"> <pathelement location="${build.src}" /> <pathelement path="${build.gwt.src}" /> <fileset dir="${build.lib.runtime}" id="compile.lib"> <include name="*.jar" /> </fileset> <fileset dir="${project.lib.compile}" id="runtime.lib"> <include name="*.jar" /> </fileset> <fileset dir="${project.lib.gwt}" id="gwt.lib"> <include name="*.jar" /> </fileset> </path>
Code xml:1 2 3 4 5 6 7 8 9 10 11 12 13
<macrodef name="gwtCompile"> <attribute name="module" /> <attribute name="classpathref" /> <attribute name="output" /> <sequential> <java classpathref="@{classpathref}" classname="com.google.gwt.dev.Compiler" fork="true"> <arg value="-war" /> <arg value="@{output}" /> <arg value="@{module}" /> <jvmarg value="-Xmx256M" /> </java> </sequential> </macrodef>
So kann direkt nach dem Java compile, GWT kompiliert und das WAR gebaut werden.
Viele Grüße
f.
-
ja, da hast du recht, dass im build-Prozess schöner ist...so habe ich es auch gemacht und ich starte die Anwendung im dev mode über maven...
Ähnliche Themen
-
GoogleMaps in Anwendung integrieren
Von Berliner84 im Forum Coders TalkAntworten: 7Letzter Beitrag: 11.03.09, 15:41 -
Aus Projekt auf die App.Config der Anwendung zugreifen
Von tecla im Forum .NET Application und Service DesignAntworten: 3Letzter Beitrag: 06.08.07, 15:24 -
externe Anwendung ohne ActiveX-Control integrieren
Von masmin im Forum .NET Windows FormsAntworten: 5Letzter Beitrag: 11.10.05, 09:48 -
[C++] CListView-Ansicht in eine dialogbasierende Anwendung integrieren?
Von WantToKnow im Forum C/C++Antworten: 2Letzter Beitrag: 04.07.05, 13:34 -
Wie Dateien ins Projekt integrieren?
Von allerdings im Forum Borland CBuilder und VCLAntworten: 1Letzter Beitrag: 11.01.05, 08:13





Zitieren
Login





