Changeset 12238 in josm
- Timestamp:
- 2017-05-23T01:25:33+02:00 (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/build.xml
r12237 r12238 144 144 <attribute name="Application-Name" value="JOSM - Java OpenStreetMap Editor"/> 145 145 <!-- Java 9 stuff. Entries are safely ignored by Java 8 --> 146 <attribute name="Add-Exports" value="java.base/sun.security.util java.base/sun.security.x509 " />146 <attribute name="Add-Exports" value="java.base/sun.security.util java.base/sun.security.x509 jdk.deploy/com.sun.deploy.config" /> 147 147 <attribute name="Add-Opens" value="java.desktop/javax.swing.text.html java.prefs/java.util.prefs" /> 148 148 </manifest> … … 444 444 <jvmarg value="--add-exports" if:set="isJava9" /> 445 445 <jvmarg value="java.base/sun.security.x509=ALL-UNNAMED" if:set="isJava9" /> 446 <jvmarg value="--add-exports" if:set="isJava9" /> 447 <jvmarg value="jdk.deploy/com.sun.deploy.config=ALL-UNNAMED" if:set="isJava9" /> 446 448 <jvmarg value="--add-opens" if:set="isJava9" /> 447 449 <jvmarg value="java.base/java.io=ALL-UNNAMED" if:set="isJava9" /> -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r12219 r12238 1657 1657 public static Date getJavaExpirationDate() { 1658 1658 try { 1659 Object value = Class.forName("com.sun.deploy.config.BuiltInProperties").getDeclaredField("JRE_EXPIRATION_DATE").get(null); 1659 Object value = null; 1660 Class<?> c = Class.forName("com.sun.deploy.config.BuiltInProperties"); 1661 try { 1662 value = c.getDeclaredField("JRE_EXPIRATION_DATE").get(null); 1663 } catch (NoSuchFieldException e) { 1664 // Field is gone with Java 9, there's a method instead 1665 Main.trace(e); 1666 value = c.getDeclaredMethod("getProperty", String.class).invoke(null, "JRE_EXPIRATION_DATE"); 1667 } 1660 1668 if (value instanceof String) { 1661 1669 return DateFormat.getDateInstance(3, Locale.US).parse((String) value);
Note:
See TracChangeset
for help on using the changeset viewer.