Now with new java 1.6.22 update installed (previous version was OK) my customers are reporting a nasty issue.
editorPane.setPage() throws exception ONLY when using my applet 2nd time
(meaning RELOADING my APPLET with browser or applet viewer)
Problem does not occur if RESTARTING applet, just when RELOADING.
Exception in thread "Thread-10" java.lang.NullPointerException
at javax.swing.text.html.parser.Parser.errorContext(Unknown Source)
at javax.swing.text.html.parser.Parser.parse(Unknown Source)
at javax.swing.text.html.parser.DocumentParser.parse(Unknown Source)
at javax.swing.text.html.parser.ParserDelegator.parse(Unknown Source)
at javax.swing.text.html.HTMLEditorKit.read(Unknown Source)
at javax.swing.JEditorPane.read(Unknown Source)
at javax.swing.JEditorPane$PageLoader.run(Unknown Source)
I am using m_editorPane.setEditorKitForContentType
How can I fix my Applet so that setPage does not crash with new JRE 1.6.22
I cannot tell customers to use older JRE.
Yup, looks like a bug introduced in 1.6.0_22.
There’s a workaround described in that link.