-
Bug
-
Resolution: Fixed
-
P3
-
6, 6u16
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2198753 | 7 | Calvin Cheung | P3 | Resolved | Fixed | b104 |
FULL PRODUCT VERSION :
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Versione 5.1.2600]
Microsoft Windows [Version 5.2.3790]
Linux ws-devel8 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC 2009 i686 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
With Java 1.6.0_13 if you have an applet run through Java Web Start and you call:
getAppletContext().showDocument(myURL, "_blank");
the browser is not launched and the URL is not opened.
This problem sometimes happens with 1.6.0_12, too, although we have an applet in which this works correctly in 1.6.0_12, but does not work in 1.6.0_13.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. compile the attached code
2. create a JAR and sign it
3. create the following JNLP and put it into a web server, together with the JAR, adapting the codebase and jar href attributes values as appropriate:
<jnlp spec="1.5+" codebase="http://localhost:8080/test/" version="1.0">
<information>
<title>Test</title>
<vendor>Test</vendor>
<homepage href="http://www.sun.com"/>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always"/>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.6.0_13"/>
<j2se version="1.6"/>
<j2se version="1.5"/>
<jar href="http://localhost:8080/test/test.jar" download="eager" main="false"/>
</resources>
<applet-desc name="Test" main-class="test.MyApplet" width="400" height="200">
</applet-desc>
</jnlp>
4. connect to that jnlp using any browser
5. after the application has started, click on the "click" button
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A new browser page is opened, pointing to http://www.sun.com
This happens correctly if you have any of the following tested Java version installed:
1.5.0_17
1.6.0_01
1.6.0_03
1.6.0_05
1.6.0_10
ACTUAL -
Nothing happens.
This is always reproducible with 1.6.0_13.
The attached test case reproduces the problem also with 1.6.0_12. However, we have a production applet in which the described method works correctly with 1.6.0_12, but does not work with 1.6.0_13.
The problem has been reproduced under Windows XP, Windows XP x64 Edition and Linux Ubuntu 8.10.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages are given. No exceptions are thrown.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
public class MyApplet extends JApplet
{
@Override
public void init()
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
JPanel p = new JPanel();
JButton b = new JButton("click");
b.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
getAppletContext()
.showDocument(
new URL("http://www.sun.com"),
"_blank");
}
catch(Exception e1)
{
throw new RuntimeException(e1);
}
}
});
p.add(b);
add(p);
}
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Uninstall JRE 1.6.0_13.
SUPPORT :
YES
Release Regression From : 6u12
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Versione 5.1.2600]
Microsoft Windows [Version 5.2.3790]
Linux ws-devel8 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC 2009 i686 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
With Java 1.6.0_13 if you have an applet run through Java Web Start and you call:
getAppletContext().showDocument(myURL, "_blank");
the browser is not launched and the URL is not opened.
This problem sometimes happens with 1.6.0_12, too, although we have an applet in which this works correctly in 1.6.0_12, but does not work in 1.6.0_13.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. compile the attached code
2. create a JAR and sign it
3. create the following JNLP and put it into a web server, together with the JAR, adapting the codebase and jar href attributes values as appropriate:
<jnlp spec="1.5+" codebase="http://localhost:8080/test/" version="1.0">
<information>
<title>Test</title>
<vendor>Test</vendor>
<homepage href="http://www.sun.com"/>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always"/>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.6.0_13"/>
<j2se version="1.6"/>
<j2se version="1.5"/>
<jar href="http://localhost:8080/test/test.jar" download="eager" main="false"/>
</resources>
<applet-desc name="Test" main-class="test.MyApplet" width="400" height="200">
</applet-desc>
</jnlp>
4. connect to that jnlp using any browser
5. after the application has started, click on the "click" button
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A new browser page is opened, pointing to http://www.sun.com
This happens correctly if you have any of the following tested Java version installed:
1.5.0_17
1.6.0_01
1.6.0_03
1.6.0_05
1.6.0_10
ACTUAL -
Nothing happens.
This is always reproducible with 1.6.0_13.
The attached test case reproduces the problem also with 1.6.0_12. However, we have a production applet in which the described method works correctly with 1.6.0_12, but does not work with 1.6.0_13.
The problem has been reproduced under Windows XP, Windows XP x64 Edition and Linux Ubuntu 8.10.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages are given. No exceptions are thrown.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
public class MyApplet extends JApplet
{
@Override
public void init()
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
JPanel p = new JPanel();
JButton b = new JButton("click");
b.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try
{
getAppletContext()
.showDocument(
new URL("http://www.sun.com"),
"_blank");
}
catch(Exception e1)
{
throw new RuntimeException(e1);
}
}
});
p.add(b);
add(p);
}
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Uninstall JRE 1.6.0_13.
SUPPORT :
YES
Release Regression From : 6u12
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
- backported by
-
JDK-2198753 java.applet.AppletContext.showDocument(URL, String) does not work with 1.6.0_13
- Resolved
- duplicates
-
JDK-6857210 BasicService.showDocument does not work for dragged-out applets started via desktop shortcut
- Closed