Problem
When I use Ant 1.10.1 to build my Java project, it occurs error as bellows:
java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0
How-To
The problem is 1.10.x releases require Java 8 at run time, but I am using Java 7 in my project.
Therefore, I need to use Ant 1.9.x releases instead of 1.10.x releases
ScenarioAs I utilized ant to build program, it throwed exception as bellows:D:\ptc\Windchill_8.0\customization\wtinstaller.xml:234: Date of 05/28/2006 07:06 午後 Cannot be parsed correctly. It should be in MM/DD/YYYY HH:MM AM_PM format.About the timestamp in the build script is written as bellows:<tstamp><format property="myDateTime" pattern="MM/dd/yyyy hh:mm aa"offset="-${sinceDays}" unit="day" /></tstamp>SolutionOwing to the locale of my environment is Japane, so it will show this kind of error message, we just need to add locale attribute to this element, and set it to be en, then we can resolve this kind of problem.<tstamp><format property="myDateTime" pattern="MM/dd/yyyy hh:mm aa"offset="-${sinceDays}" unit="day" locale="en"/></tstamp>