java-11

Compilation fails for JDK 11 and compiles fine for JDK 8

心已入冬 提交于 2019-12-07 01:53:56
问题 The code compiles fine with JDK 8 (1.8.0_212) but fails to compile using JDK 11 (11.0.3) both Oracle jdk and open jdk (aws corretto) Tried compiling using javac and with Maven (maven version 3.6.1 and maven-compiler-plugin version 3.8.0) it compiles for JDK 8 and fails for JDK 11. import java.net.URL; import java.util.List; import java.util.ArrayList; import java.util.Arrays; import java.util.function.Function; import java.util.stream.Stream; public class AppDemo { public static void main

How to fix jvm options exports javafx 11 to com.jfoenix on gradle idea?

最后都变了- 提交于 2019-12-06 21:13:30
It's been 3 days that I look on the internet how to fix this on gradle Caused by: java.lang.IllegalAccessError: class com.jfoenix.skins.JFXTabPaneSkin (in module com.jfoenix) cannot access class com.sun.javafx.scene.control.behavior.TabPaneBehavior (in module javafx.controls) because module javafx.controls does not export com.sun.javafx.scene.control.behavior to module com.jfoenix On simple idea projects I was adding --add-exports javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix --add-exports javafx.controls/com.sun.javafx.scene.control=com.jfoenix --add-exports javafx.base

How to produce code in Java 11, but target Java 8 and above?

余生颓废 提交于 2019-12-06 17:27:52
问题 I am working on a small library and for obvious reasons I would like to produce code using all the Java 11 features (except modules I guess for now), but I would like the library to be compatible with Java 8 and above. When I try this: javac -source 11 -target 1.8 App.java I get the following message: warning: source release 11 requires target release 11 ...and when I look at the byte code I see that the version of the class is 0x37 (Java 11): $ xxd App.class 00000000: cafe babe 0000 0037 ...

Does Java 11 or 12 supports Struts 1.3?

北慕城南 提交于 2019-12-06 15:24:38
问题 Am trying to upgrade maven Struts 1.3 built using Java 1.7 to Java 1.8 and was able to successfully launch the application after changing all possible library files. Now, it has been instructed to upgrade the application to Java 11 or 12. Does Java 11 or 12 supports Struts 1.3 ? Can I proceed to make this changes? Your thoughts please. 来源: https://stackoverflow.com/questions/56521038/does-java-11-or-12-supports-struts-1-3

Apache Archiva using JDK 11 throwing BeanCreationException: Error creating bean with name 'roleManager'

限于喜欢 提交于 2019-12-06 11:52:07
Using apache archiva with Oracle JDK 11 configured on Windows with class path. The exception trace shows as following on running archiva.bat console using PowerShell PS D:\Programs\apache-archiva-2.2.3\bin> .\archiva.bat console wrapper | --> Wrapper Started as Console wrapper | Launching a JVM... jvm 1 | Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0 jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. jvm 1 | jvm 1 | 2018-10-31 11:29:42.367:WARN:oejd

Upgrading to Java 11 from Java 8 - package sun.util does not exist

夙愿已清 提交于 2019-12-06 11:34:17
I'm trying to migrate an application from Java 8 to Java 11. When I try and build the project in IntelliJ I get a package sun.util does not exist error? Any ideas on what's up? Thanks! Packages com.sun.* and sun.* hold internal stuff, and should not be used by thirdparty applications (like yours probably) in general case. Since in java 9 the module system has been introduced, now Oracle "protect" these packages even in compile time. So the obvious way is to get rid of this dependency in your code. Why do they protect? Because they leave the right to themselves to change this stuff, its

Migrating to OpenJDK 11, which version of MySql connector is compatible for java 11?

让人想犯罪 __ 提交于 2019-12-06 11:05:53
问题 I am trying to migrate my application from Java 8 to OpenJDK 11. I used MySql connector version 5 and its working fine. Is it required to upgrade MySql connector JAR to version 8.0? I read about it from below link but they do not mentioned about Java 11. https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-versions-java.html 回答1: According to your reference, and this, we clearly can see that, MySQL connector version 5 uses JDBC version 3.0, 4.0, 4.1, 4.2 . MySQL connector version 8 uses

Java JDK 11 Breaking Old Jars/Programs

不羁的心 提交于 2019-12-06 10:37:06
It is to my understanding that Java JREs are backwards compatible, if you write a program in Java (JDK) 7, it will run with Java (JRE) 8. I have a couple of programs I developed in Java 8, and have .jar and EXE files that I built when I finished them, and they always ran fine. However, after installing Java JDK 11 (11.0.2), these old .jar files break... A couple of them still run, but their GUIs have expanded, with buttons and images being bigger than before, and in some cases blurry One program just doesn't run at all, trying to run it in a console gives an exception: " Exception in thread

Netbeans 9.0 with JavaFx 11 and JDK 11

混江龙づ霸主 提交于 2019-12-06 07:53:43
问题 I am trying to run JavaFX 11 on NetBeans 9 Since JDK 11 does not have JavaFX anymore I couldn't get NetBeans to run a JavaFX project, it says: "Failed to automatically set-up a JavaFX Platform." I then downloaded the javafx11 from this website https://gluonhq.com/products/javafx/, after following the tutorial I was able to compile and run a JavaFX class normally through terminal. The only way I could add JavaFX is by using Maven, but I can't run the application even that it was built

How to keep connection alive in Java 11 http client

泄露秘密 提交于 2019-12-05 21:53:28
I'm using the Java 11 HttpClient with HTTP/2 and need to keep connection alive for few minutes, but the builder does not have the option to set it. Is there a way to specify this and make client keep the connection alive for some time? If you build a standard HttpClient e.g. using HttpClient.newHttpClient(); by default a connection pool is created. This pool keeps the connections alive by default for 1200 seconds (20 minutes). If you want to change the keep-alive timeout you can do so using the property jdk.httpclient.keepalive.timeout . However the value is only read once when the class jdk