bugged.be

"Think outside the [B0X]"
Icon

SmartGwt in Netbeans

First when you try to run a SmartGWT application (as with ExtGWT) you will run out of java heap space when you try to compile. To fix this, modify build-gwt.xml as follows:

In target “-post-compile”, change:

<java fork="true" classname="com.google.gwt.dev.GWTCompiler" failonerror="true" classpath="${javac.classpath}:${src.dir}">

to:

<java maxmemory="512M" fork="true" classname="com.google.gwt.dev.GWTCompiler" failonerror="true" classpath="${javac.classpath}:${src.dir}">

and add the following child element to that same element:

<jvmarg value="-Xmx512M"></jvmarg>

There are also two places that you see

name="${gwtshell.jvmargs.base}" value="-Xdebug . . ."

add -Xmx512M to that list of arguments.

Now you will be able to run it, but none of the images in the SmartGWT.jar will show up. To get those working, look at your gwt.properties file and change

gwt.output.dir=/com.test.Main

to

gwt.output.dir=./

Look at the auto generated HTML file and make sure you change

<script language="javascript" src="com.test.Main/com.test.Main.nocache.js"></script>

to

<script language="javascript" src="com.test.Main.nocache.js"></script>

Note that the memory changes you made to build-gwt.xml will be overwritten each time you open NetBeans.
See issue https://gwt4nb.dev.java.net/issues/show_bug.cgi?id=36

Category: Dev notes, Java

Tagged: , ,