java-11

Migration to JDK 11 has error occure “java.lang.NoClassDefFoundError: javax/activation/DataSource” (tomcat 9.0.12) [duplicate]

依然范特西╮ 提交于 2019-11-29 14:04:18
This question already has an answer here: What is the replacement for javax.activation package in java 9? 3 answers Replacements for deprecated JPMS modules with Java EE APIs 7 answers I'm migrating java project use JDK8 to use JDK 11 then has error occurred relate of javax activation. Following migration guide from Oracle, I see java.activation that module was removed from JDK 11. After that, I give a suggest to added third parties **activation-1.0.2.jar* but still, an error has occurred? Please give a suggestion about problem ? and could you tell me about experience of Migration source code

How to customise “host” header in Java http client

跟風遠走 提交于 2019-11-29 11:11:49
Here's my code: HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://127.0.0.1:8081/")) .header("Host", "test.example.com") .build(); client.send(request, HttpResponse.BodyHandlers.ofString()); As a result I see that the above code sends: GET / HTTP/1.1 Connection: Upgrade, HTTP2-Settings Content-Length: 0 Host: 127.0.0.1:8081 HTTP2-Settings: AAEAAEAAAAIAAAABAAMAAABkAAQBAAAAAAUAAEAA Upgrade: h2c User-Agent: Java-http-client/10 Host: test.example.com As you can see it sends two Host headers (the one from URI and the one I

Move to OpenJDK-11 but compile in Java 8

╄→尐↘猪︶ㄣ 提交于 2019-11-29 10:36:06
I have an existing Spring boot App that i build through gradle . All these days I have been using JDK / JRE 8 and now I am trying to use JDK-11 So to check the Compatability, I am setting the JAVA_HOME to JDK-11 but trying to compile in Java 8 mode I added the below block in my build.gradle compileJava { targetCompatibility = '1.8' } and then I set JAVA_HOME explicitly set JAVA_HOME=C:\Users\arun\Desktop\jdk-11.0.1 and then execute gradlew clean build But I am stopped with the below exception > Configure project : Build Version = build-182-ga03cf6c > Task :compileJava FAILED FAILURE: Build

Eclipse 2018-09 goes into endless build loop with Java 11 plugin: ClosedFileSystemException

允我心安 提交于 2019-11-29 10:04:41
I'm running Eclipse 2018-09 (4.9.0) on Windows 10. I'm using Open JDK 11 GA. I have a project using Java 8 compliant source code that compiles fine using the JDK, both from Eclipse and from Maven. I want to use new Java 11 features, so first I changed the compiler source/target from Java 8 to Java 11. It still built find using Maven on the command line, but couldn't compile in Eclipse (see Eclipse 2018-09 won't compile Java 11 source; thinks it is below 1.7 ). So I added the "Java 11 Support for Eclipse 2018-09" plugin from the Eclipse Marketplace. I restarted Eclipse and used Alt+F5 to

How to get JavaFX and Java 11 working in IntelliJ IDEA

旧街凉风 提交于 2019-11-29 07:53:04
With the recent Java 11 release, JavaFX is no longer included in the JDK. I have an existing JavaFX project. I am interested in learning how to change it from a Java 10 project to a Java 11. I am certain I have installed Java 11 correctly, and I am able to change the default SDK from Java 10 to Java 11. What I don't know is how I might get JavaFX working with Java 11. I have downloaded the latest JavaFX release here . I have extracted it to my Java folder which contains my other JDK's, but I really don't know what to do at this point. I have read some lengthy guides that describe how to

Springboot: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

☆樱花仙子☆ 提交于 2019-11-29 05:24:41
问题 I know, it is duplicate question,but problem is new, Please do not mark duplicate question. This program runs in Window 10 it's run fine and create a database, but when same program runs in Debian 9 it throws exception. after that i checked this problem on google. some people said, create a all user class state setter and getter method. I created a setter and getter method but same exception is thrown. User Class @Entity public class User { @Id private Long id; private String firstName;

How do you invoke schemagen in Java 11?

蹲街弑〆低调 提交于 2019-11-29 05:08:53
According to Oracle documentation the schemagen tool is removed from the JDK as part of JEP 320 ( http://openjdk.java.net/jeps/320 ). That JEP points to Maven artifacts that now supply the missing tools. The coordinates of the artifacts are wrong in the JEP, updated coordinates are found in an answer to this question: Which artifacts should I use for JAXB RI in my Maven project? What is missing however is how to invoke the tools. There are shell scripts pointed to in the JEP that are in the JAXB-RI Git repository. However those scripts remain undocumented and difficult to invoke. The build

Is there a replacement for the garbage collection JVM args in Java 11?

柔情痞子 提交于 2019-11-29 03:46:59
In Java 11 a number of JVM args relating to GC logging are not supported anymore. What, if anything, can they be replaced with, if we still want to use GC logging? In particular, this relates to the following JVM args: -Xlog:gc:work/logs/gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCApplicationStoppedTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles -XX:GCLogFileSize Thanks. List of your <arguments, current mapping, reasons> is as follows: -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps ==> Not applicable now. Reason : Time/date stamps are logged by the

Running javafx sample on JDK 11 with OpenJFX 11 JMODS on Module Path

不羁岁月 提交于 2019-11-29 01:58:25
I have downloaded the JavaFX Jmod files from OpenJFX project and placed them in the directory G:\openjfx\javafx-jmods-11 . I am using OpenJDK 11 which has no JavaFX jmod in JAVA_HOME/jmods i.e it doesn't come with JavaFX distribution. Module info file: module gui{ requires javafx.graphics; requires javafx.controls; exports com.test; } I compile with following: javac -p G:\openjfx\javafx-jmods-11 -d mods --module-source-path src src\gui\com\test\*.java src\gui\module-info.java Compilation succeeds. But I am unable to run the compiled code using the below command: java -p G:\openjfx\javafx-jmods

Is there a replacement library for CORBA in JDK 11

早过忘川 提交于 2019-11-28 20:14:45
JDK-11 will remove a lot of older parts of the JDK ( JEP-320 ). For some of them (e.g. JAXB) functionality will be provided as regular library. You simply add another dependency and everything works fine again. But not so for CORBA, because There is no significant interest in developing modern applications with CORBA in Java I am however in the painful situation of needing to maintain older applications that still require CORBA while still wanting to update to JDK-11. Is there a replacement-library out there or another good way of migrating to JDK-11 without removing the CORBA functionality of