我刚刚使用GWT的webAppCreator创建了一个新项目,效果很好。但是,当我尝试运行ant hosted
时,它失败并显示以下输出:
[java] On Mac OS X, ensure that you have Safari 3 installed.
[java] Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load required native library 'gwt-ll'. Detailed error:
[java] Can't load library: /usr/local/gwt-mac-1.7.1/libgwt-ll.dylib)
[java]
[java] Your GWT installation may be corrupt
[java] at com.google.gwt.dev.shell.LowLevel.init(LowLevel.java:106)
[java] at com.google.gwt.dev.shell.mac.LowLevelSaf.init(LowLevelSaf.java:135)
[java] at com.google.gwt.dev.BootStrapPlatform.initHostedMode(BootStrapPlatform.java:68)
[java] at com.google.gwt.dev.HostedModeBase.<init>(HostedModeBase.java:362)
[java] at com.google.gwt.dev.SwtHostedModeBase.<init>(SwtHostedModeBase.java:127)
[java] at com.google.gwt.dev.HostedMode.<init>(HostedMode.java:271)
[java] at com.google.gwt.dev.HostedMode.main(HostedMode.java:230)
相关的ANT任务“托管”:
<target name="hosted" depends="javac" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<jvmarg value="${XstartOnFirstThreadFlag}"/>
<!--<jvmarg value="${d32Flag}"/>-->
<jvmarg value="-d32" />
<arg value="-startupUrl"/>
<arg value="MyApplication.html"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="com.disney.MyApplication"/>
</java>
</target>