>>>>> Steinar Bang <[email protected]>:

>>>>> Steinar Bang <[email protected]>:
>>> And the reason it tries to throw an exception tin the first place, is
>>> that ADD_FWK_URL_METHOD is because the "addUrl" method is missing from
>>> the URL class.

>> From the google searches I've made addUrl() hasn't appeared on the list
>> of removed stuff in java >= 9.

> And it looks like there was no URL.addUrl() method in the URL class of
> java-8:
>  https://docs.oracle.com/javase/8/docs/api/java/net/URL.html

Not sure if this is a karaf bug or a pax exam bug, but it is a bug when
running under java 11.

The method the code setting up ADD_FWK_URL_METHOD is looking for, isn't
a method on URL.

The code looks for, and doesn't find, the method
 sun.misc.Launcher.AppClassLoader#addUrl(java.net.URL)

So I googled for AppClassLoader and java 11 and found this:
 https://blog.codefx.org/java/java-11-migration-guide/#symptoms-2

With Java-11 AppClassLoader no longer is a URLClassLoader, and therefore
(presumably) no longer has an addUrl() method and that's why the pax
exam boot of OSGi fails.

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/86pnnqh2pj.fsf%40dod.no.
For more options, visit https://groups.google.com/d/optout.

Reply via email to