java-9 Questions

5

Solved

This is the code I'm running: import java.io.RandomAccessFile; import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; public class Main { public static void main(String[] args) ...
Buggy asked 11/8, 2014 at 7:42

1

I'm creating an user event system using JDK 9 Flow API, so I have a room (which implements Flow.Subscriber<Notification>), it may have many users and each user can offer (dispatch) updates at...

3

Solved

Java 9 allows us to have private methods in interface, which means that not explicitly marking public methods is no longer superfluous. However, is it now mandatory to do so? I hope the specificat...
Selfknowledge asked 8/8, 2017 at 17:6

1

Arguments passed to javac are as follows: [javac] Using modern compiler [javac] Compilation arguments: [javac] '-deprecation' [javac] '-d' [javac] '..' [javac] '-classpath' [javac] '..' [javac] '-...
Fondue asked 6/3, 2018 at 15:47

2

Solved

I am running the following command with java 9 : keytool -keystore NONE -storetype PKCS11 -providerClass sun.security.pkcs11.SunPKCS11 -providerArg pkcs11conf -list and get the flowing error...
Violation asked 21/11, 2017 at 12:6

4

Solved

The HttpClient introduced experimentally in Java 9 is now stable in Java 11, but not surprisingly, very few projects seem to actually use it. Documentation is almost non-existing. One of the most ...
Dextrad asked 8/11, 2018 at 19:43

4

Solved

When using the JShell, how do I exit it back to the CMD line? I have already tried ctrl + x and just writing quit, but to no joy.
Chura asked 25/10, 2017 at 10:30

25

Solved

This exception occurs in a wide variety of scenarios when running an application on Java 9. Certain libraries and frameworks (Spring, Hibernate, JAXB) are particularly prone to it. Here's an exampl...
Mildredmildrid asked 21/12, 2016 at 14:34

15

Executing a simple "Hello World" program using Java 9 results in the following error message: Error occurred during initialization of boot layer java.lang.module.FindException: Module com.pante...
Saree asked 27/3, 2018 at 19:19

7

Solved

TLDR: On Java 9/10, a web app in Tomcat has no access to JAXB even though its reference implementation is present on the class path. Edit: No, this is not a duplicate of How to resolve java.lang.N...
Jug asked 25/7, 2018 at 12:21

3

Solved

I have a rather simple project structure in Maven with sub-modules: / -pom.xml -Utils/ -pom.xml In /pom.xml I define properties for all sub-modules, like library versions or plugins configuration...
Archery asked 21/5, 2018 at 14:40

5

Solved

Given that Java 9 is upon us and we can finally have a java REPL with jshell I was hoping there was a way to add a shebang to a script and have jshell interpret it. I tried creating test.jsh: #!/...
Deckhouse asked 5/7, 2017 at 3:36

6

Solved

When I try to run Zeppelin by either bin/zeppelin.sh or bin/zeppelin-deamon.sh start I was getting the following error message. Unrecognized VM option 'MaxPermSize=512m' Error: Could not cre...
Islington asked 4/11, 2017 at 15:38

2

Solved

Java 9 (jdk-9+170) does not allow by default an application to see all classes from the JDK, unlike all previous versions of Java, due to the new module system. To workaround this, the java command...

3

Solved

Project structure I have a project written in Java 8 and I want to update it to Java 9. So I separated the classes into 2 separate modules. Modules: org.ggp.base with module-info.java in the dir...
Goines asked 25/3, 2018 at 13:46

9

The following code adds jar file to the build path, it works fine with Java 8. However, it throws exception with Java 9, the exception is related to the cast to URLClassLoader. Any ideas how this c...
Melancholic asked 11/10, 2017 at 17:51

8

Below is a form: <form action="/example/html5/demo_form.asp" method="post" enctype=”multipart/form-data”> <input type="file" name="img" /> <input type="text" name=username" value...
Gusman asked 24/9, 2017 at 16:16

13

Solved

I'm trying to run my Spring Boot application on Java 9, and I've faced with JAXB problem, which described in the guides, but didn't work for me. I've added dependency on JAXB api, and application s...
Tomika asked 19/8, 2018 at 9:21

5

Solved

Java 9 offers Map.of() feature to easily create a map with fixed values. Problem: I want to create a map that preserves order of insertion like LinkedHashMap. Is that possible with that factory? A...
Stalder asked 10/9, 2018 at 9:17

46

Solved

I have some code that uses JAXB API classes which have been provided as a part of the JDK in Java 6/7/8. When I run the same code with Java 9, at runtime I get errors indicating that JAXB classes c...
Epanodos asked 23/4, 2017 at 17:40

3

As answered in How to ignore the system default Locale to retrieve resourceBundle you can configure in Java 8 or older to not fallback to default locale via: ResourceBundle.getBundle("MyResources"...
Sallyanne asked 24/5, 2017 at 20:2

3

I have a Maven project with Java 9 and am using modules. Logback seems to support this since version 1.3.0-alpha1 but unfortunately I didn't got it to work. I get the following message from SLF4J:...
Horehound asked 20/2, 2019 at 2:24

8

Solved

I'm trying to create a bean from sources that were generated by wsdl2java. Every time I try to run my Spring Boot app, I get the following error: Caused by: java.lang.ClassCastException: class ...
Sixfold asked 5/2, 2019 at 14:43

2

I have 2 different projects in the same folder: com.jdojo.address and com.jdojo.person. The first has a simple pojo class Address and a module-info.java under default package: module com.jdojo.ad...
Cider asked 4/8, 2017 at 13:51

7

Solved

Let's say I have a Java project using Maven 3 and junit. There are src/main/java and src/test/java directories which contain main sources and test sources, respectively (everything is standard). N...
Sitter asked 6/10, 2017 at 20:5

© 2022 - 2024 — McMap. All rights reserved.