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
0
votes
0 answers

java install issue error

I'm trying to install java. It looks that java is installed correctly, but when type java in cmd get this error. Could someone advise what this means? C:\Users\Kamil>java Usage: java [options] [args...] (to execute a class) or java…
Karolina
  • 1
  • 2
0
votes
0 answers

How to patch classes in multi-module setup - Java 9

Here is an example directory structure, created for patching classes in java.base, java.logging: src +- java.base + module-info.java +- java +- lang +- Object.java +- java.logging + module-info.java +-…
Gayan Weerakutti
  • 11,904
  • 2
  • 71
  • 68
0
votes
2 answers

Java 9 Multithreaded HTTP request

I can't figure out how to covert the following sequential code to a multi-threaded properly. I have done my best to avoid any shared resource and complete thread independence. This is the single-threaded code package com.net; import…
m.d
  • 169
  • 2
  • 9
0
votes
0 answers

Java library only working on java 1.8

For a university assessment we're doing a large java project which makes use of a given external hardware that utilises a given java library to interact with it. The main problem is that such java library only runs on java 1.8 (the reason is not…
MathT
  • 65
  • 7
0
votes
0 answers

SplashScreen/Jdialog is not in center anymore in java9

I just switched to java 9 from java 8. I am using following code to build a splash screen. Splash screen comes in the center of the monitor if I use java 8, but with java 9 its not in center. Any idea, what can I do? public void showSplashScreen()…
user1631306
  • 4,350
  • 8
  • 39
  • 74
0
votes
0 answers

How to define a JPA domain module that works using Spring Boot 2.0 with Hibernate JPA and Gradle?

I am working on a multi module Java 9 project that uses Spring Boot 2.0 with Hibernate. Furthermore I use Gradle 4.6 to build this multi module project. Since it is a greenfield project I'd love to start declaring Java 9 modules. One of them is a…
saw303
  • 8,051
  • 7
  • 50
  • 90
0
votes
1 answer

java 9 : confusing rules about Resources and modules

In module com.thing.withprops I have this code in com.thing.withprops.UseProps.java: URL url =UseProps.class.getResource("config/values.properties") ; module-info is module com.thing.withprops { exports com.thing.withprops;} now there is another…
bear
  • 111
  • 4
0
votes
0 answers

Java EE 9 Jersy error

I have started to learn Java and have stacked for a couple of day on this. HTTP Status 500 – Internal Server Error Type Exception Report Message Servlet.init() for servlet [com.recnav.api.RestApp] threw exception Description The server encountered…
Eno Hoxha
  • 1
  • 1
0
votes
2 answers

Bundle OpenJDK9 with FreeType @ref in libfontmanager.dylib

I am attempting to bundle FreeType with my Mac build of OpenJDK9, but am having trouble with references to libfreetype after building is completed. I am packaging the JDK with my application, and do not want the end user to have to install FreeType…
0
votes
0 answers

Jdeps is not referring the env variables for execution

I have multiple JDKs configured in my system i.e. JDK 8, 9 & 10 (early access). I need to execute the Jdeps tool available in JDK 9, however on issuing the jdeps -version command the one available in JDK 8 is getting executed. I have the PATH and…
Curious Coder
  • 646
  • 8
  • 18
0
votes
0 answers

How to compile Java 7-compatible code under JDK 9 (eclipse)

I've updated to JDK 9, but some users of my apps report that application does not start up (they have Java 7). How can I compile my code the way it will be compatible with Java 7? I am using Eclipse. EDIT : It's not a duplicate. The question you are…
Jast Redd
  • 1
  • 1
0
votes
2 answers

How do you modify an xjc block in ANT build.xml for Java 9?

I have a build.xml file that uses xjc to generate some Java classes. Everything builds fine in Java 1.8, but updating to Java 9 causes the following error: xjc-gen-boxes: [xjc] C:\Users\dev\Documents\Dev\bc\bcce2\build\gensrc\co\boxes\v2 is not…
mat7e
  • 1
  • 1
  • 1
0
votes
1 answer

StackOverflowError on java.net.SocketInputStream

my system Debian 9 java --version java 9.0.4 Java(TM) SE Runtime Environment (build 9.0.4+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode) i run my program (that does looots of crawling in parallel) and after a while i am…
Michal
  • 150
  • 3
  • 13
0
votes
2 answers

Find log file name at run time with Java 9 JDK Logging

I have the same question as Find actual opened logfile with JDK Logging, except that I want to use an API that's supported by Java 9. In Java 8, I currently use nearly the same reflection hack as described in the answer to that question except that…
David
  • 251
  • 2
  • 11
0
votes
2 answers

Mvvmfx: initialize-method causes NoClassDefFoundError: javax/annotation/PostConstruct

i'm trying to implement a mvvm-pattern with JavaFx. To do so i'm using the mvvmfx-framework. To use data from a model i've tried to use the NotificationCenter. When inserting an initialize-method in my viewModel to subscribe to messages i get an…
Piepette
  • 21
  • 3
1 2 3
99
100