[ 
https://issues.apache.org/jira/browse/KARAF-3518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15693484#comment-15693484
 ] 

Guillaume Nodet commented on KARAF-3518:
----------------------------------------

I don't think we will be able to support deploy providers as OSGi bundles 
anymore and have them used automatically by the JVM through the usual APIs.  
The reason is that what we do in the {{apache-karaf}} distribution it to deploy 
hacked versions of the specs, however, there will be no apache licensed version 
of those specs that works with java 9 in the short term.

What can be done is the following:
  * add a {{[KARAF_HOME]/lib/modules}} directory which will contain Java 9 
modules
  * add those modules to the module path using {{--module-path}} option for 
javac
  * eventually export the packages from the system bundle
The obviously remove some dynamism because the providers can't be deployed as 
OSGi bundles at runtime.

If the client code supports it, some providers can be deployed as OSGi bundles 
instead, but the requirement will be for the client code to not use the usual 
factories to create instances of the providers, but to instantiate them 
directly.



> JDK9: endorsed directories not working any longer
> -------------------------------------------------
>
>                 Key: KARAF-3518
>                 URL: https://issues.apache.org/jira/browse/KARAF-3518
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core, karaf-os-integration
>    Affects Versions: 4.0.0.M3
>         Environment: OS X, 
> java version "1.9.0-ea"
> Java(TM) SE Runtime Environment (build 1.9.0-ea-b49)
> Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b49, mixed mode)
>            Reporter: Achim Nierbeck
>            Assignee: Guillaume Nodet
>              Labels: java9
>             Fix For: 4.1.0
>
>
> following message is caught with JDK 1.9: 
> {code}
> -Djava.endorsed.dirs=/Library/Java/JavaVirtualMachines/jdk1.9.0.jdk/Contents/Home/jre/lib/endorsed:/Library/Java/JavaVirtualMachines/jdk1.9.0.jdk/Contents/Home/lib/endorsed:/Users/anierbeck/Development/server/apache-karaf-4.0.0.M2/lib/endorsed
>  is not supported. Endorsed standards and standalone APIs
> in modular form will be supported via the concept of upgradeable modules.
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to