开发者

Error running new gwt app in hosted mode, OS X 10.6

I just created a new project using webAppCreator from GWT which worked fine. However, when I try to run ant hosted it fails with the following output:

 [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 开发者_StackOverflow中文版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)

Related ANT task "hosted": <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>


Copy or make a dynamic link of libgwt-ll.jnilib to libgwt-ll.dylib and try it again. Looks like someone else had a similar issue when using SoyLatte JVM. Details can be found here.


Your hosted session is probably running in 64 bits and needs to run in 32 bit. See here for full details. Basically add the -d32 flag to the vm arguments in the Arguments section of the run configuration. You should only have to do this for run configs that existed before updating to 1.7.1. When I create a new run config the -d32 is populated for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜