How to set vmarg on ant build?

1 view
Skip to first unread message

scaevola via StackOverflow

unread,
Mar 15, 2012, 10:07:00 AM3/15/12
to google-appengin...@googlegroups.com

When I try to run jdoexamples in appengine sdk I get an error. There is a workaround(-Dappengine.user.timezone.impl=UTC), which works when I set it on eclipse. But how could I do the same when I build it with ant? Here is the error output from ant build:

runserver:
 [java] java.lang.RuntimeException: Unable to restore the previous TimeZone
 [java]     at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:228)
 [java]     at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:164)
 [java]     at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
 [java]     at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
 [java]     at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
 [java]     at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
 [java] Caused by: java.lang.NoSuchFieldException: defaultZoneTL
 [java]     at java.lang.Class.getDeclaredField(Class.java:1882)
 [java]     at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:222)
 [java]     ... 5 more

BUILD SUCCESSFUL Total time: 4 seconds



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/9721342/how-to-set-vmarg-on-ant-build

Yegor via StackOverflow

unread,
Mar 15, 2012, 1:20:17 PM3/15/12
to google-appengin...@googlegroups.com

Another option is to set the system property from within your build.xml file using sysproperty



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/9721342/how-to-set-vmarg-on-ant-build/9724843#9724843

Yegor via StackOverflow

unread,
Mar 15, 2012, 1:30:15 PM3/15/12
to google-appengin...@googlegroups.com

Another option is to set the system property from within your build.xml file using the sysproperty attribute of the java task:

 <java classname="test.Main" >
    <sysproperty key="appengine.user.timezone.impl" value="UTC"/>
  </java>
Reply all
Reply to author
Forward
0 new messages