0

I need to change the system property

gwt.imageResource.maxBundleSize

to 1000. How would I do this?

The property exists as I see it here; https://code.google.com/p/google-web-toolkit/source/browse/releases/2.5/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java#471

Yet I cant figure out how to set this in the GWT.XML:

<set-property name="gwt.imageResource.maxBundleSize" value="1000" />

results in;

[ERROR] Property 'gwt.imageResource.maxBundleSize' not found

so I tried creating the property;

<define-property name="gwt.imageResource.maxBundleSize" values="1000" />

but that gets me;

[ERROR] Invalid property value '1000'

In fact, any numerical values results in this error. The only things it accepts are strings starting with letters.....but thats obviously useless as Googles code is;

private static final int IMAGE_MAX_SIZE = Integer.getInteger(
  "gwt.imageResource.maxBundleSize", 256);

So I am stumped how I am supposed to set this property.

darkflame
  • 998
  • 1
  • 9
  • 23

1 Answers1

1
<define-property name="gwt.imageResource.maxBundleSize" values="1000" />

You are creating a new property here, not assigning a value to an existing property. I don't know why the error is happening, but rest assured that even if the error wasn't happening, you'd still not be setting the value you are trying to set. Because...

private static final int IMAGE_MAX_SIZE = Integer.getInteger(
   "gwt.imageResource.maxBundleSize", 256);

that code doesn't read from your gwt.xml file. From the javadoc for Integer.getInteger:

/**
 * Determines the integer value of the system property with the
 * specified name.

According to this, you should be setting a system property when you run the compiler (or dev mode). Adding this to the JVM args might look something like this:

-Dgwt.imageResource.maxBundleSize=1000
Colin Alworth
  • 17,801
  • 2
  • 26
  • 39
  • Thanks, that seems to have done the trick. It took me awhile to spot it had to go in "VM Arguments" dialogue box, instead of the "Compiler Arguments" dialogue box in eclipse. But after that it worked. Little confusing though the different methods used to set compile options. – darkflame Oct 31 '13 at 13:08