What is the point of overloaded Convenience Factory Methods for Collections in Java 9

From the JEP docs itself – Description – These will include varargs overloads, so that there is no fixed limit on the collection size. However, the collection instances so created may be tuned for smaller sizes. Special-case APIs (fixed-argument overloads) for up to ten of elements will be provided. While this introduces some clutter in … Read more

How to solve InaccessibleObjectException (“Unable to make {member} accessible: module {A} does not ‘opens {package}’ to {B}”) on Java 9?

The exception is caused by the Java Platform Module System that was introduced in Java 9, particularly its implementation of strong encapsulation. It only allows access under certain conditions, the most prominent ones are: the type has to be public the owning package has to be exported The same limitations are true for reflection, which … Read more

Unable to derive module descriptor for auto generated module names in Java 9?

The solution to this seems to be:- A way possible to uninterruptedly using the same artifact name with a new(different) module name could be by packaging META-INF/MANIFEST.MF of the artifact with an attribute Automatic-Module-Name which governs the name of the module to be used by the module descriptor when converted as an automatic module. OR … Read more

Replacements for deprecated JPMS modules with Java EE APIs

Instead of using the deprecated Java EE modules, use the following artifacts. JAF (java.activation) JavaBeans Activation Framework (now Jakarta Activation) is a standalone technology (available on Maven Central): <dependency> <groupId>com.sun.activation</groupId> <artifactId>jakarta.activation</artifactId> <version>1.2.2</version> </dependency> (Source) CORBA (java.corba) From JEP 320: There will not be a standalone version of CORBA unless third parties take over maintenance of … Read more