FULL PRODUCT VERSION :
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+124)
Java HotSpot(TM) Client VM (build 9-ea+124, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
When I add a line
deployment.javaws.secure.properties=java.locale.providers
to the system-level or user-level deployment.properties file, the next Web Start launch after changing the property does not take into account the change
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
0. Ensure that no Java applications are running on the local computer
1. Deploy a small web start application that needs access to a secure property (see test code)
2. Sign the JAR file
3. Launch the app, it should fail with an exception. Close the app.
4. Add the line deployment.javaws.secure.properties=java.locale.properties to the system-level or user-level deployment.properties file as described in https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/properties.html
5. Launch the app a second time. Close the app.
6. Launch the app a third time. Close the app.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The application should fail the first time, but launch correctly the second and third times
ACTUAL -
The application only runs correctly the third time (that is, the second time after setting the deployment configuration correctly)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
(Same test case asJI-9040893)
test.jnlp
==========
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0+" codebase="http://www.example.com/webstart/test" href="test.jnlp">
<information>
<title>Test app</title>
<vendor>Anon</vendor>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="always" policy="always" />
<resources>
<j2se version="1.6+"/>
<jar href="test.jar" main="true"/>
<property name="java.locale.providers" value="COMPAT,CLDR"/>
</resources>
<application-desc main-class="Toto"/>
</jnlp>
Toto.java
==========
import java.text.*;
import java.util.*;
public class Toto {
private static final String TXT = "3/20/15 10:59:00 PM";
public static void main(String... argv) throws Exception {
DateFormat dateformat= DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.MEDIUM,
Locale.US);
dateformat.setTimeZone(TimeZone.getTimeZone("GMT"));
System.out.println(System.getProperty("java.locale.providers"));
try {
Date date = dateformat.parse(TXT);
} catch(Exception e) {
e.printStackTrace(System.err);
}
}
}
---------- END SOURCE ----------
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+124)
Java HotSpot(TM) Client VM (build 9-ea+124, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
When I add a line
deployment.javaws.secure.properties=java.locale.providers
to the system-level or user-level deployment.properties file, the next Web Start launch after changing the property does not take into account the change
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
0. Ensure that no Java applications are running on the local computer
1. Deploy a small web start application that needs access to a secure property (see test code)
2. Sign the JAR file
3. Launch the app, it should fail with an exception. Close the app.
4. Add the line deployment.javaws.secure.properties=java.locale.properties to the system-level or user-level deployment.properties file as described in https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/properties.html
5. Launch the app a second time. Close the app.
6. Launch the app a third time. Close the app.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The application should fail the first time, but launch correctly the second and third times
ACTUAL -
The application only runs correctly the third time (that is, the second time after setting the deployment configuration correctly)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
(Same test case as
test.jnlp
==========
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0+" codebase="http://www.example.com/webstart/test" href="test.jnlp">
<information>
<title>Test app</title>
<vendor>Anon</vendor>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="always" policy="always" />
<resources>
<j2se version="1.6+"/>
<jar href="test.jar" main="true"/>
<property name="java.locale.providers" value="COMPAT,CLDR"/>
</resources>
<application-desc main-class="Toto"/>
</jnlp>
Toto.java
==========
import java.text.*;
import java.util.*;
public class Toto {
private static final String TXT = "3/20/15 10:59:00 PM";
public static void main(String... argv) throws Exception {
DateFormat dateformat= DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.MEDIUM,
Locale.US);
dateformat.setTimeZone(TimeZone.getTimeZone("GMT"));
System.out.println(System.getProperty("java.locale.providers"));
try {
Date date = dateformat.parse(TXT);
} catch(Exception e) {
e.printStackTrace(System.err);
}
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8166697 Changes to deployment.javaws.secure.properties don't seem to have any effect
-
- Closed
-
- relates to
-
JDK-8160610 Can't change locale providers under Web Start
-
- Closed
-
-
JDK-8166698 deployment.properties file not correctly taken into account under specific circumstances
-
- Closed
-