Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gwt Google Web Toolkit编译错误,找不到GTWCompiler_Gwt - Fatal编程技术网

Gwt Google Web Toolkit编译错误,找不到GTWCompiler

Gwt Google Web Toolkit编译错误,找不到GTWCompiler,gwt,Gwt,当我想编译我的GTW项目时,我在控制台中得到了以下输出: ant -f "C:\\Users\\Donatas\\Desktop\\b2b\\servlet" "-Dbrowser.context=C:\\Users\\Donatas\\Desktop\\b2b\\servlet" -DforceRedeploy=false -Ddirectory.deployment.supported=true -Dnb.internal.action.name=run run init: deps-mod

当我想编译我的GTW项目时,我在控制台中得到了以下输出:

ant -f "C:\\Users\\Donatas\\Desktop\\b2b\\servlet" "-Dbrowser.context=C:\\Users\\Donatas\\Desktop\\b2b\\servlet" -DforceRedeploy=false -Ddirectory.deployment.supported=true -Dnb.internal.action.name=run run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
wsimport-init:
wsimport-client-ic:
files are up to date
wsimport-client-generate:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
GWT4NB https://github.com/gwt4nb/gwt4nb
GWT installation directory: C:\Users\Donatas\Desktop\b2b\lib\gwt-2.7.0
init:
do-gwt-compile-15:
GWT Compiling client-side code.
Error: Could not find or load main class com.google.gwt.dev.GWTCompiler
C:\Users\Donatas\Desktop\b2b\servlet\nbproject\build-gwt.xml:326: The following error occurred while executing this line:
C:\Users\Donatas\Desktop\b2b\servlet\nbproject\build-gwt.xml:356: Java returned: 1
我的build-gtw.xml 326行是:

    <target name="-pre-dist" depends="-gwt-define-compile-unneeded">
        <antcall target="-gwt-print-dir"/>
326:    <antcall target="do-gwt-compile-15" />
        <antcall target="do-gwt-compile-16" />
        <antcall target="do-gwt-compile-17" />
        <antcall target="do-gwt-compile-20" />
        <antcall target="do-gwt-compile-23" />
        <antcall target="do-gwt-compile-25" />
    </target>
       <target name="do-gwt-compile-15" if="gwt.version.15" 
                unless="gwt.compile.unneeded" depends="-init-gwt-dir">
            <!-- You can override this property in the 'gwt.properties' file -->
            <property name="gwt.compiler.output.style" value="OBFUSCATED"/>
            <property name="gwt.compiler.logLevel" value="WARN"/>
            <echo>GWT Compiling client-side code.</echo>
            <java failonerror="true"
                  classname="com.google.gwt.dev.GWTCompiler" fork="true"
line 356:         jvmargs="${gwt.compiler.jvmargs}">
                <classpath>
                    <!--
                    GWT libraries are mentioned here explicitly so they are always
                    at the front of the class path.
                    -->
                    <pathelement path="${gwt.dir}/gwt-user.jar"/>
                    <fileset dir="${gwt.dir}">
                        <include name="gwt-dev-*.jar"/>
                    </fileset>
                    <pathelement path="${gwt.dir}/gwt-servlet.jar"/>
                    <pathelement path="${javac.classpath}"/>
                    <pathelement path="${src.dir}"/>
                    <pathelement path="${build.classes.dir}"/>
                </classpath>
                <arg value="-out"/>
                <arg path="${build.web.dir}/"/>
                <arg value="-style"/>
                <arg value="${gwt.compiler.output.style}"/>
                <arg value="-logLevel"/>
                <arg value="${gwt.compiler.logLevel}"/>
                <arg line="${gwt.compiler.args}"/>
                <arg line="${gwt.module}"/>
            </java>

            <property name="gwt.output.dir" value="${gwt.module}"/>

            <move todir="${build.web.dir}/${gwt.output.dir}">
                <fileset dir="${build.web.dir}/${gwt.module}"/>
            </move>
            <touch file="${build.dir}/gwtc.run"/>
        </target>

326:    
我的build-gtw.xml 356行是:

    <target name="-pre-dist" depends="-gwt-define-compile-unneeded">
        <antcall target="-gwt-print-dir"/>
326:    <antcall target="do-gwt-compile-15" />
        <antcall target="do-gwt-compile-16" />
        <antcall target="do-gwt-compile-17" />
        <antcall target="do-gwt-compile-20" />
        <antcall target="do-gwt-compile-23" />
        <antcall target="do-gwt-compile-25" />
    </target>
       <target name="do-gwt-compile-15" if="gwt.version.15" 
                unless="gwt.compile.unneeded" depends="-init-gwt-dir">
            <!-- You can override this property in the 'gwt.properties' file -->
            <property name="gwt.compiler.output.style" value="OBFUSCATED"/>
            <property name="gwt.compiler.logLevel" value="WARN"/>
            <echo>GWT Compiling client-side code.</echo>
            <java failonerror="true"
                  classname="com.google.gwt.dev.GWTCompiler" fork="true"
line 356:         jvmargs="${gwt.compiler.jvmargs}">
                <classpath>
                    <!--
                    GWT libraries are mentioned here explicitly so they are always
                    at the front of the class path.
                    -->
                    <pathelement path="${gwt.dir}/gwt-user.jar"/>
                    <fileset dir="${gwt.dir}">
                        <include name="gwt-dev-*.jar"/>
                    </fileset>
                    <pathelement path="${gwt.dir}/gwt-servlet.jar"/>
                    <pathelement path="${javac.classpath}"/>
                    <pathelement path="${src.dir}"/>
                    <pathelement path="${build.classes.dir}"/>
                </classpath>
                <arg value="-out"/>
                <arg path="${build.web.dir}/"/>
                <arg value="-style"/>
                <arg value="${gwt.compiler.output.style}"/>
                <arg value="-logLevel"/>
                <arg value="${gwt.compiler.logLevel}"/>
                <arg line="${gwt.compiler.args}"/>
                <arg line="${gwt.module}"/>
            </java>

            <property name="gwt.output.dir" value="${gwt.module}"/>

            <move todir="${build.web.dir}/${gwt.output.dir}">
                <fileset dir="${build.web.dir}/${gwt.module}"/>
            </move>
            <touch file="${build.dir}/gwtc.run"/>
        </target>

GWT编译客户端代码。

我知道GWTCompiler已被弃用,但如何更改它如果我在编译器中更改,我会得到一个错误,即我的控制台参数[-out]无法识别。那么如何编译呢。我正在使用GTW 2.7版本。

自从GWT 1.7左右以来,编译器就没有被调用过
GWTCompiler
。改用
com.google.gwt.dev.Compiler
作为类名。

自gwt 1.7左右以来,编译器从未被调用过
GWTCompiler
。改用
com.google.gwt.dev.Compiler
作为类名。

自gwt 1.7左右以来,编译器从未被调用过
GWTCompiler
。改用
com.google.gwt.dev.Compiler
作为类名。

自gwt 1.7左右以来,编译器从未被调用过
GWTCompiler
。改用
com.google.gwt.dev.Compiler
作为类名。

它看起来像是GWT4NB中的一个bug。它应该为GWT2.7调用
do-gwt-compile-25
,而不是
do-gwt-compile-15

尝试手动更新
build gwt.xml
,将2.7大小写添加到
gwt.version.25


但由于另一个bug,它可能无法工作(问题仍然存在,不知道它是否已修复,我不使用Netbeans):(代码中的一个快速grep似乎表明您可以在项目的
nbproject/gwt.properties
中定义gwt.version=2.6或gwt.version=2.7,不确定它是否可以工作或被Netbeans插件覆盖)它看起来像GWT4NB中的一个bug。它应该为GWT2.7调用
do-gwt-compile-25
,而不是
do-gwt-compile-15

尝试手动更新
build gwt.xml
,将2.7大小写添加到
gwt.version.25


但由于另一个bug,它可能无法工作(问题仍然存在,不知道它是否已修复,我不使用Netbeans):(代码中的一个快速grep似乎表明您可以在项目的
nbproject/gwt.properties
中定义gwt.version=2.6或gwt.version=2.7,不确定它是否可以工作或被Netbeans插件覆盖)它看起来像GWT4NB中的一个bug。它应该为GWT2.7调用
do-gwt-compile-25
,而不是
do-gwt-compile-15

尝试手动更新
build gwt.xml
,将2.7大小写添加到
gwt.version.25


但由于另一个bug,它可能无法工作(问题仍然存在,不知道它是否已修复,我不使用Netbeans):(代码中的一个快速grep似乎表明您可以在项目的
nbproject/gwt.properties
中定义gwt.version=2.6或gwt.version=2.7,不确定它是否可以工作或被Netbeans插件覆盖)它看起来像GWT4NB中的一个bug。它应该为GWT2.7调用
do-gwt-compile-25
,而不是
do-gwt-compile-15

尝试手动更新
build gwt.xml
,将2.7大小写添加到
gwt.version.25

但由于另一个bug,它可能无法工作(问题仍然存在,不知道它是否已修复,我不使用Netbeans):(代码中的一个快速grep似乎表明您可以在项目的
nbproject/gwt.properties
中定义gwt.version=2.6或gwt.version=2.7,不确定它是否可以工作或被Netbeans插件覆盖)

-->添加这一行

我在build gwt.xml上添加了2.7版,它适合我:D


-->添加这一行

我在build gwt.xml上添加了2.7版,它适合我:D


-->添加这一行

我在build gwt.xml上添加了2.7版,它适合我:D


-->添加这一行

我在build gwt.xml上添加了2.7版,它适用于我:D

打开build-gwt.xml

那么

尝试删除:

  <antcall target="do-gwt-compile-15" />

运行时,这应该可以运行

打开build-gwt.xml

那么

尝试删除:

  <antcall target="do-gwt-compile-15" />

运行时,这应该可以运行

打开build-gwt.xml

那么

尝试删除:

  <antcall target="do-gwt-compile-15" />

运行时,这应该可以运行

打开build-gwt.xml

那么

尝试删除:

  <antcall target="do-gwt-compile-15" />


运行时,这应该会起作用

还可以使用
-war
代替
-out
,和
gwt-dev.jar
代替
gwt-dev-*.jar
。也可以使用
-war
代替
-out
,和
gwt-dev.jar
代替
gwt-dev-*.jar
。也可以使用
-war
代替
-out
,和
gwt-dev.jar
而不是
gwt-dev-*.jar
。也使用
-war
代替
-out
,和
gwt-dev.jar
而不是
gwt-dev-*.jar
。在build-gwt.xml中添加并在gwt.properties中定义gwt.version from\到2.7解决了问题…在build-gwt.xml中添加并在gwt.properties from\到2.7中解决了问题…在build-gwt.xml中添加并定义gwt.version