java-platform-module-system Questions

3

Solved

I've created what I'm pretty sure is a modular jar file. But if possible, I'd like to double check. Given a jar file, is there a way to determine what modules the compiler would find within it?
Carney asked 7/10, 2017 at 3:57

3

Eclipse oxygen; windows 7; JDK 9 final from 9, 21; JUnit 4.12 and an existing application. As starting point the application can be compiled, executed and all JUnit Tests shows green. Now we use ec...
Heartbeat asked 27/9, 2017 at 20:37

1

Solved

I just tested my java 9 module understanding in command line. Then I moved to Intellij IDEA 2017.2.5 to test it. There I am facing the error module is not in dependencies Don't know why intellij is...

1

Solved

Right now, for every module I have, I need to explicitly specify packages I want to export. For example: module core { exports cc.blynk.server.core; exports cc.blynk.server.core.protocol.h...
Spectrophotometer asked 30/9, 2017 at 12:23

1

Solved

Using immutables-library works fine with java 9 until I add a module-info.java to the project, Immutables*.java will no longer be generated. To the module-info I add 'requires value' as suggested ...

1

Solved

I follow the Jigsaw quickstart here. I successfully ran the jlink command given: jlink --module-path $JAVA_HOME/jmods:mlib --add-modules com.greetings --output greetingsapp That produces a "runt...
Strap asked 25/9, 2017 at 20:3

2

Solved

I've included these dependencies in my Maven pom.xml: <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>$...
Schismatic asked 24/9, 2017 at 17:5

2

Solved

The documentation for each of these states following: ResolvedModule A module in a graph of resolved modules. ResolvedModule defines the configuration method to get the configuration that the...
Kellar asked 20/9, 2017 at 19:57

2

Solved

When I compile a module that depends on other modules I've compiled previously I have to specify the --module-path <directory> option. This makes modules I depend on visible. But at the sam...

2

Solved

I am trying to understand how JPMS works. From here The classpath is not completely gone yet. All JARs (modular or not) and classes on the classpath will be contained in the Unnamed Module. ...

3

Solved

I have an OSGI application and I have around 30 bundles (jar files). Today I decided to see how it works/if it works with Java 9. So I started my application and got WARNING: An illegal reflectiv...
Ammoniate asked 5/9, 2017 at 18:42

5

I am using jdk-9 and I want to use sun.reflect.* package in my code but I am getting the below exception Exception in thread 'main' java.lang.IllegalAccessError : class Test (in moudle: Unnamed Mo...
Selfregard asked 24/1, 2017 at 4:41

3

Solved

I understand the benefits of the Java Platform Module System (JPMS) for large applications, but is there any reason to make a small library or application into a (single) module? If so, are Modular...
Maggot asked 12/8, 2017 at 21:47

1

Solved

In Java 9's module declaration there are 2 constructs: exports com.foo; And opens com.foo; Where exports grants compile-time access, while opens allows runtime access, as reflection and reso...
Coarsegrained asked 23/7, 2017 at 20:22

2

Solved

In Java 9, will cyclic modules be allowed? If no, what are the reasons? module com.foo.bar { requires com.foo.baz; exports com.foo.bar.fizz; } module com.foo.baz { requires com.foo.bar; expor...

2

Solved

When I run this test (using jmockit and TestNG, not sure if that's relevant): public class Test { @Test public void test(@Mocked ProcessBuilder pb) throws IOException { new Expectations() {{ pb....
Unhealthy asked 10/7, 2017 at 17:33

2

Solved

I am trying to build an open-source project against Java 9. There are some files which I need to access using reflection but I cannot because the packages are not exported by their modules. I expor...
Orangeman asked 26/6, 2017 at 9:55

2

Solved

JDK9 will (probably) introduce a module system. As part of that, the Java Class Library will get modularized. This can lead to exceptions when classes don't get found because they are in a module ...
Manouch asked 16/6, 2017 at 5:40

5

Solved

Java's package management system always seemed simple and effective to me. It is heavily used by the JDK itself. We have been using it to mimic the concept of namespaces and modules. What is Proje...
Simmons asked 7/8, 2012 at 11:20

1

Solved

I need a way to tell a newly created class loader (with no set parent) about modules I want exposed to it (e.g. java.scripting). What's the reflection equivalent of passing --add-modules on the c...
Daphnedaphnis asked 7/6, 2017 at 5:1

2

In the upcoming Java 9, is there a way to dynamically discover which modules are available? E.g.: Run some app with some module path While the app is running, add a few more modules into the mod...
Shakti asked 2/6, 2017 at 19:6

3

My Java library should be compatible with Java 8 and Java 9. For running with Java 9 we need some of the Java 9 modules. I know that I can add it via command line with --add-modules. But it is a l...
Gavrielle asked 25/4, 2017 at 9:19

2

Why does java 9 module system has java.se module which has transitive dependencies on other modules. Isn't it same as depending upon entire rt.jar in pre Java 9 world. module java.se { requires t...
Abeyance asked 25/5, 2017 at 10:35

1

Solved

This is the module declaration of the java.rmi module: module java.rmi { requires java.base; requires java.logging; exports java.rmi.activation; exports com.sun.rmi.rmid to java.base; // <...
Patel asked 22/5, 2017 at 4:32

1

Solved

When I run an application via java -cp (without --add-modules or --limit-modules), some Java system modules are observable while the others are not. For example, all java.se modules are observable...
Colorist asked 18/5, 2017 at 14:56

© 2022 - 2024 — McMap. All rights reserved.