-
1. Re: Depending on a Jigsaw module
emeuwese Dec 11, 2018 2:27 PM (in response to pmm)To me your question is a bit vague. Jigsaw is the name of the project to create the module system. In your module-info.java you can define which packages, services are accessible to others and which modules are required. Code from sun packages should not be used directly. Internal code could be removed or be inaccessible in future releases of the JDK. May be you could tell a little bit more about which module your code depends on?
If you intent to use something like sun.misc.Unsafe then your module-info.java could look like
module com.company.example { requires jdk.unsupported; }
then your class can import sun.misc.Unsafe; and do something like
Unsafe.class.getDeclaredField("unsafe");
Or is your idea to do something like this Dealing with Sun JDK related NoClassDefFoundError under Jboss | Planet JBoss Developer
-
2. Re: Depending on a Jigsaw module
jaikiran Dec 11, 2018 9:52 PM (in response to emeuwese)I think what Philippe wants is to refer/add a dependency in JBoss module.xml to a Java module instead of a JBoss module.
> How can this be achieved?
You can just add a dependency by the same name as that of the Java module. There are other JBoss modules within WildFly which do that. For example here wildfly-core/module.xml at master · wildfly/wildfly-core · GitHub
-
3. Re: Depending on a Jigsaw module
pmm Dec 12, 2018 5:40 AM (in response to emeuwese)emeuwese wrote:
To me your question is a bit vague. Jigsaw is the name of the project to create the module system. In your module-info.java you can define which packages, services are accessible to others and which modules are required. Code from sun packages should not be used directly. Internal code could be removed or be inaccessible in future releases of the JDK. May be you could tell a little bit more about which module your code depends on?
jdk.jfr
-
4. Re: Depending on a Jigsaw module
pmm Dec 13, 2018 2:08 AM (in response to jaikiran)jaikiran wrote:
I think what Philippe wants is to refer/add a dependency in JBoss module.xml to a Java module instead of a JBoss module.
> How can this be achieved?
You can just add a dependency by the same name as that of the Java module. There are other JBoss modules within WildFly which do that. For example here wildfly-core/module.xml at master · wildfly/wildfly-core · GitHub
That does what we need, thanks.