Total Pageviews

Showing posts with label ant. Show all posts
Showing posts with label ant. Show all posts

2018/02/10

[Ant] java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 52.0

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



2009/02/17

Set up a simple way to backup testing server database



1. write an ant build file to generate dump file and copy to remote machine (on a daily basis)

















2. create a batch file to execute my build script

3. add this batch file to scheduler service


4. result
[local machine]


[remote machine]

2006/05/30

[ANT] Date of 05/28/2006 07:06 午後 Cannot be parsed correctly. It should be in MM/DD/YYYY HH:MM AM_PM format


Scenario

As 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>

Solution
Owing 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>