java-11

Java 11 Unable to derive module descriptor

柔情痞子 提交于 2019-12-08 21:15:43
问题 I am getting this error message when I try to compile my new modularized Java 11 application: Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for C:\Users\inter\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.apache.bsf.BSFManager not in module This appears to be an issue from a dependency of a dependency. I can't even find which module is

Java 11 package javax.xml.soap does not exist [duplicate]

不羁岁月 提交于 2019-12-08 17:35:54
问题 This question already has answers here : Replacements for deprecated JPMS modules with Java EE APIs (7 answers) Closed 10 months ago . I'm trying to create a simple message using SOAP: MessageFactory mf = MessageFactory.newInstance(); SOAPMessage message = mf.createMessage(); When I build the project with Java 8 it's fine, but building it with Java 11 fails with a compilation error: package javax.xml.soap does not exist How do I fix the issue? 回答1: JAX-WS removed from Java 11 JAX-WS is no

Java 11 without modularity: package does not exist while it is added as maven dependency

房东的猫 提交于 2019-12-08 14:21:55
问题 I have three very simple applilcations. One is COMMON which I will center security configs, other with ZUUL feature and the third is a EUREKA SERVER. Both are Spring Boot and Java 11. Although I am using Java 11 I am not reling on modularity (as far as I know it will not make sense use modularity feature with Spring Boot). When I run all three in Eclipse I successfully can run the server, common and zuul in that sequence. When I try to maven build I get the error mentioned in subject. The

Oracle JDK 11 installer & JAR file association on Windows

时光总嘲笑我的痴心妄想 提交于 2019-12-07 20:05:28
问题 I just installed Oracle JDK 11 on my Windows 10. I noticed that the PATH variable doesn't include the JDK 11 path. Also the .JAR file extension is not associated with javaw. Our users used to doubleclick JAR file to execute the client Java/SWING application. With Java 11 this doesn't work. Is this a bug or feature? I know how to set the PATH and start the application manually using the command line. I just want to make it easier for end-users. Any ideas? 回答1: There is no Public JRE in Java 11

How to figure out which Xlint option corresponds to a compiler warning?

可紊 提交于 2019-12-07 15:02:16
问题 My software builds use -Xlint -Werror so I routinely run across compiler warnings that break my build. Every once in a while I run across a warning that I need to suppress, but it's always difficult to figure out which Xlint option suppresses the warning I am seeing. I'll give you a concrete example. I recently ran across: [WARNING] module-info.java:[16,106] module not found: org.bitbucket.cowwoc.requirements.guava I searched the JDK 11 source-code and discovered this warning message declared

Java Play akka project migration from jdk8 to jdk11

社会主义新天地 提交于 2019-12-07 12:42:15
问题 I am trying to migrate the project which was built on jdk8 using play and Akka framework to jdk11. During the process, I am getting the below error. Could someone please let me know why is the error being thrown? Below are the versions I am using: JDK-11 SCala 2.12.8 Play 2.6.7 Akka 2.5.13 Exception: java.lang.NumberFormatException: Not a version: 11 at scala.util.PropertiesTrait$class.parts$1(Properties.scala:176) at scala.util.PropertiesTrait$class.isJavaAtLeast(Properties.scala:180) at

How to launch single-file programs in Java 11 (or later)?

别来无恙 提交于 2019-12-07 11:03:47
问题 JEP 330 describes a new feature in JDK 11 for launching single-file programs in Java. I've tried: $ ./Example.java but it doesn't work. What is the correct usage? 回答1: Short-version: $ java Example.java data.txt or (with #! ): $ ./example data.txt Details: Working example here. Consider a single-file program to print the lines in a file: import java.nio.file.*; import java.util.stream.Stream; public class ExampleJDK11 { public static void main(String[] args) throws Exception { // snip ...

package sun.awt does not exist

↘锁芯ラ 提交于 2019-12-07 07:14:44
问题 When compiling with ant , calls to sun.awt.AppContext work, however the same code compiled with IntelliJ fails using AdoptOpenJDK11. sun.awt.AppContext with Oracle JDK8 works with IntelliJ sun.awt.AppContext with AdoptOpenJDK11 does NOT work with IntelliJ Although Sun/Oracle has warned for a while about avoiding the sun.* packages, there are certain features (bugs?) in Java that still require them and stranger, the command line seems happy. Sample code: package test; import javax.print

Switching to java 11 from java 8

自作多情 提交于 2019-12-07 05:31:31
问题 I have downloaded and installed oraclejdk11 from oracle official site and modified PATH & JAVA_HOME variable in system environment variable on windows C:\Users\Aviral>javac -version javac 11.0.1 C:\Users\Aviral>java -version java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode) i know that jdk11 do not contain jre but how can i run a java program from cmd in java 11 回答1: bin folder contains all the

OpenJDK 11 problem - Client finished handshake before last UNWRAP

空扰寡人 提交于 2019-12-07 05:23:39
问题 I am migrating our code base from Oracle Java 1.8.0_131 to OpenJDK 11.0.1. We have code that implements nio-ssl socket channels. In Java 8, the client/server handshake works fine. In Java 11, the client finishes the handshake before it unwraps the last handshake message from the server. To produce this problem, I am just establishing a connection between the client and server and letting them perform a SSL handshake. I am NOT sending any additional data through. I establish the connection