Questions tagged [java-9]

Use this tag for questions specific to Java 9, which is version 9 of the Java platform, released on the 21st of September 2017. In most cases you should also specify the java tag.

Oracle has released its updated list of proposed or targeted Java 9 enhancements. In addition to previously confirmed Java modularity updates, the most recent list includes a common logging system for all JVM components (JEP 158), more HotSpot JIT compiler controls (JEP 158), and refinements to improve the efficiency of garbage collection (JEP 214), and repair issues introduced by Project Coin language updates in JDK 7 (JEP 213). This is also the first release under the new version-string schema (JEP 223) and will hence be officially be numbered 9, not "1.9.0" as was the case for earlier versions.

Even with delays, Oracle has been steadily moving forward with its plans to modularize the JDK. But the scope of Java modularity took a step up in September, when Oracle announced four new JEPs, including JEP 220: Modular Run-Time Images. Ben Evans, writing for InfoQ, noted that swapping JARs for modules is the "point of no return for modularity," with serious implications for IDEs, toolmakers, and many Java application frameworks:

After this point, The Java Runtime Environment (JRE) will no longer be contained in jar files, and instead will be composed of modules (JSR 376). Files such as rt.jar and tools.jar no longer exist in the JRE. The platform will continue to accept and run applications and libraries packaged in conventional jar files, modular jar files, or in the new module file format. The intention is that over time, application developers wil migrate to the new modular formats as well.

See "Oracle Commit to Java Modularity" for more from Ben Evans on modularity updates in Java 9. Also see Takipi Blog: "Java 9 – The Ultimate Feature List" for a comprehensive (as of November 20, 2014) description of new features accepted or proposed for the next major release of Java, and "What's New in Java 9? (Besides Modules)" for another more recent compilation of features.

The API documentation of the release can be accessed at Oracle's technetwork.

1606 questions
1
vote
1 answer

java 9 b132 eclipse neon setsecuritymanager cannot be resolved

Using java 1.9 (b132), Eclipse Neon (4.6.0), I am working through a large legacy java client front end project in preparation for java 9. Most of the code works, but this problem I cannot resolve. I have added the following to the…
AlanH
  • 11
  • 2
1
vote
1 answer

One of --module-version or --hash-dependencies without module-info.class error getting while packaging as jar in jdk 9

I am exploring Project Jigsaw @ JDK 9, almost all Java developers are thinking of how Oracle going to bring modularity for Java 9. I have created a sample java project, code got compiled without any error. Below is generated byte code files and its…
Sriram M
  • 482
  • 3
  • 12
1
vote
2 answers

How to override installed mappings of Behavior?

In java-9 Skins made it into public scope, while Behaviors are left in the dark - nevertheless changed considerably, in now using InputMap for all input bindings. CellBehaviorBase installs mouse bindings like: InputMap.MouseMapping pressedMapping,…
kleopatra
  • 51,061
  • 28
  • 99
  • 211
1
vote
0 answers

Is there a fix for the NoClassDefFoundError for GarbageCollectorExtImpl?

I ran into a Java 9b78 problem. It would be expected that an error like this would come up, but this was also a problem in b68 as well. I thought I would use Java 9 and attempt to play minecraft on it for java's performance improvements. I got the…
AMDG
  • 1,118
  • 1
  • 13
  • 29
0
votes
0 answers

Are there any solutions available that would eliminate the need to add `jvm` options when using Java 9 modules?

I am new to using Java 9 modules. I am aware that there are different types of Java 9 modules such as Automatic modules and Unnamed modules. I am curious why I am able to use third-party dependencies such as google-guava as Automatic modules…
fade
  • 1
  • 2
0
votes
0 answers

Mockito cannot mock this class - Caused by: NoClassDefFoundError: sun/misc/ObjectInputFilter$FilterInfo

While executing JUnits with OpenJdk-11, Mockito-3.12.4 and powermock-2.0.9 getting below error. Also, I am using third party library (pcm.jar) which is compiled by Java 1.8. Error is…
Chowdappa
  • 1,580
  • 1
  • 15
  • 31
0
votes
1 answer

Java9 'asIterator' equivalent implementation in Java8

Below piece of code is using asIterator() method from Java 9 can someone please help me to convert below code compatible with Java 8? private static Function> asURLs(String packageDir) { return cl -> { try { …
Swapnil Kotwal
  • 5,418
  • 6
  • 48
  • 92
0
votes
0 answers

Vaadin 14, production build and java version 9 not working

I need some of features of java 9 and I have vaadin 14 app. When I changed java.version in the pom.xml to the java version 9, app. is not running in Tomcat server (production build). Tomcat only show static content of / dir. Build through spring…
ZZerog
  • 1
  • 2
0
votes
0 answers

Java module system: how to avoid leaking all packages of transitive modules

In java module system, we can have: module hellomodule { exports com.name.hello; requires transitive greetings; } by doing this the packages exposed by greetings module will effectively become part of the API exposed by the hellomodue. We…
GionJh
  • 2,742
  • 2
  • 29
  • 68
0
votes
1 answer

Cannot access 'java.lang.Object' error with new Android Studio Electric Eel

I just installed the new Electric Eel Android Studio stable version, but I am getting the following error messages below although the project builds without errors. The errors are happening in the build.gradle.kts file for the buildSrc module. What…
Raj Narayanan
  • 2,443
  • 4
  • 24
  • 43
0
votes
1 answer

In NetBeans Java, how do you create a multi-module project?

I want to create a multi-module Java project, in NetBeans 15. By "module", I mean the Java-9 "modularity" feature, where each module folder has a module-info.java file that specifies its exports or depends or etc. I know how to code a multi-module…
0
votes
0 answers
0
votes
1 answer

Java jar manifest file with unrecognized fields

I am working on migration my application to java9, I found that I can set Add-Opens in my manifest file to open some java internal packages for reflection usage. I am thinking fields like Add-Opens are only support after java9, so I wonder what will…
0
votes
0 answers

How to get service of concrete Module in JPMS?

I have a dynamically created layer that has about 25 modules. About 7-10 modules can provide com.foo.Bar service. I need to get a service of concrete module - I have a reference to Module. Could anyone say how to do it? Details: public com.foo.Bar…
Pavel_K
  • 10,748
  • 13
  • 73
  • 186
0
votes
2 answers

Cannot convert from Stream to boolean

I'm trying to filter a list of objects say BOLReference based on a key which is present in the inner object of one of the List of Objects of this BOLReference. List bolRef = complianceMongoTemplate.find(findQuery,…
Mira Devi
  • 65
  • 1
  • 9