Questions tagged [unnamed-module]
10 questions
16
votes
1 answer
Java 9 migration issue - package com.mymodule is declared in unnamed module , module 'newmodule' does not read it
I have created a multimodule project with the following structure
myproject
|- mymodule
|- src
|- main
|- java
|- com
|- mymodule
|-…

learner
- 332
- 2
- 6
- 22
10
votes
2 answers
How many unnamed modules are created in Java 9?
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.
Similar to automatic modules, it exports all packages…

Pavel_K
- 10,748
- 13
- 73
- 186
6
votes
1 answer
Dependening on legacy jar in Java 9 Module System library using gradle
Problem
How do you create a java library jar that both:
is java module (has module-info)
has a depending legacy (non-module) jar. (like commons-exec)?
The dependency is an implementation detail - should not be exported.
Sources
Having the…

rzymek
- 9,064
- 2
- 45
- 59
4
votes
1 answer
Interactions between code in two unnamed modules
Premise: I have had 2 classes loaded by different class loaders - one from the app classloader and the other, a custom class loader. The class loaded by the custom class loader is trying to reflectively access a private field in the class loaded via…

kembhootha
- 83
- 5
2
votes
2 answers
How to use modularized jars in a not modularized application?
In various places i saw the following information: The classes inside the the unnamed module are allowed to read exported packages on the module path.
Inside the directory src/calculators i have the module-info.java file:
module calculators {
…

krionz
- 417
- 1
- 4
- 15
2
votes
1 answer
How to let a java class on classpath access a class belonging to a module on module-path
I am trying out the various access rules about who can access and what and I saw this statement in The State of the module system document,
The unnamed module reads every other module. Code in any type loaded from the class path will thus be able…

Priyshrm
- 662
- 8
- 20
1
vote
0 answers
Java Module Layers: Access classes in custom ModuleLayer from unnamed module
We have a plugin system with multiple module layers:
The PluginLoader module inside the boot layer instantiates a custom ModuleLayer for each Module at runtime with ModuleLayer::defineModulesWithOneLoader.
We now have a set of non-modular plugins…

Jan Janneck
- 11
- 1
- 1
1
vote
1 answer
What is the value of adding non-modular jars to the -classpath and modular jars to the --module-path when compiling a module?
I've seen that in a project with module-info.java, maven adds the modular jars (containing module-info.class or manifest property Automatic-Module-Name ), to the --module-path, and the rest of the jars to the -classpath.
But the spec states:
[...]…

Marinos An
- 9,481
- 6
- 63
- 96
0
votes
0 answers
Unable to make private java.time.ZonedDateTime accessible: module java.base does not "opens java.time" to unnamed module
I am migrating the project from Java 11 to Java 17. While running the junit test cases, Getting below exceptions:
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private…

Sachin Pandey
- 47
- 1
- 8
-1
votes
1 answer
Error while naming unnamed columns in Python dataframe
Using this code to name the first column in the dataframe:
df1 = df1.rename(columns={'Unnamed:0' : 'time'}, inplace=True)
This gives me NoneType object.
I tried removing inplace=True but then it just gives back the dataframe just like the original.…

Ankita
- 5
- 2