2 //#*******************************************************************************
\r
3 //#* Copyright (C) 1997-2009, International Business Machines Corporation and *
\r
4 //#* others. All Rights Reserved. *
\r
5 //#*******************************************************************************
\r
6 //#* This is the ant build file for ICU4J. See readme.html for more information.
\r
8 // policies needed to run tests
\r
9 grant // codebase "file:${user.dir}/icu4jtests.jar"
\r
11 // temporary for debugging
\r
12 // permission java.lang.RuntimePermission "getProtectionDomain";
\r
14 // ibm 141 on ibm xp can't use reflection
\r
15 permission java.lang.RuntimePermission "accessDeclaredMembers";
\r
17 // needed for Locale.setDefault, only used in tests and demos
\r
18 permission java.util.PropertyPermission "user.language", "write";
\r
20 // needed for TestUtils
\r
21 permission java.util.PropertyPermission "ICUDataPath", "read";
\r
22 permission java.util.PropertyPermission "user.dir", "read";
\r
23 permission java.util.PropertyPermission "GENERATE_TEST_DATA", "read";
\r
26 permission java.util.PropertyPermission "user.timezone", "read";
\r
29 permission java.lang.RuntimePermission "charsetProvider", "read";
\r
31 // IBM 1.6 on Windows does not allow to use reflection to access
\r
32 // getDSTSavings in TimeZone implementation class in sun.util.clanedar.
\r
33 permission java.lang.RuntimePermission "accessClassInPackage.sun.util.calendar";
\r
36 // there must be a way for code in one jar file to call code in another jar
\r
37 // file and give the called code permission to read the calling code's
\r
38 // jar. they're in different protection domains despite being on the
\r
39 // same classpath and being loaded by the same class loader, so the class
\r
40 // loader doesn't disambiguate which protection domain we're using. it's
\r
41 // not easy to figure out the security docs, sigh.
\r
43 // this is so ICUData (in icu4j.jar), called from test code (in icu4jtests.jar)
\r
44 // can read test resource files (in icu4jtests.jar"
\r
46 grant codebase "file:${user.dir}/icu4j.jar"
\r
48 permission java.io.FilePermission "${/}${user.dir}${/}icu4jtests.jar", "read";
\r
49 permission java.io.FilePermission "${/}${user.dir}${/}icu4j-charsets.jar", "read";
\r