With recent early access releases of JDK9 (e.g. 9-ea+113), the XML plugin crashes on plugin startup:
java.lang.IllegalStateException: Already connected
at java.net.URLConnection.checkConnected(java.base@9-ea/URLConnection.java:1816)
at java.net.URLConnection.setUseCaches(java.base@9-ea/URLConnection.java:993)
at java.util.ServiceLoader.parse(java.base@9-ea/ServiceLoader.java:454)
...
at javax.xml.parsers.FactoryFinder.findServiceProvider(java.xml@9-ea/FactoryFinder.java:289)
...
at org.apache.xml.resolver.Catalog.setupReaders(Catalog.java:399)
at xml.Resolver.load(Resolver.java:270)
...
at xml.XmlPlugin.start(XmlPlugin.java:54)
...
XML plugin startup initializes the internal jEdit XML resolver. That in turn triggers the URL stream handler for "jeditresource:" URLs. And that returns an already connected URLConnection in its openConnection() method. The subsequent call to setUseCaches() on that URLConnection throws the IllegalStateException when it finds that the URLConnection is already connected.
To solve this problem, please erase line 46 (c.connect()) in the "jeditresource:" URL stream handler. The handler must not return a connected URLConnection.
See also Bug #3912.
Last edit: will69 2016-04-25
Just to be perfectly clear: This is a bug and it has been for 17 years. The only thing this has to do with Java 9 is that Java 9 tells you so. Would some kind soul please take the offending line out?
fixed in r24374 - confirmed fix on oracle jdk 9b116-1 pre-release on ArchLinux.
It will appear in Tomorrow's jedit-daily build and in jEdit 5.3.1 when it's release.
@will69 Thanks for the fix! I'll also look into #3912.
Thank you very much, Eric!