java-11

How to open JavaFX .jar file with JDK 11?

僤鯓⒐⒋嵵緔 提交于 2019-11-27 08:58:25
I created a JavaFX project in IntelliJ. I can run project in IntelliJ. I added below code in Configurations): --module-path ${PATH_TO_FX} --add-modules=javafx.controls,javafx.fxml But the output .jar file of project (made with Artifects) doesn't run. I tested these commands, but didn't get any chance: java --module-path %PATH_TO_FX% --add-modules javafx.controls,javafx.fxml -jar Timer.jar java --module-path %PATH_TO_FX% --add-modules javafx.controls Timer.jar Last error log of command line: Error: Could not find or load main class Files\Java\javafx-sdk-11.0.1\lib Caused by: java.lang

Difference between String trim() and strip() methods in Java 11

旧城冷巷雨未停 提交于 2019-11-27 03:48:04
Among other changes, JDK 11 introduces 6 new methods for java.lang.String class: repeat(int) - Repeats the String as many times as provided by the int parameter lines() - Uses a Spliterator to lazily provide lines from the source string isBlank() - Indicates if the String is empty or contains only white space characters stripLeading() - Removes the white space from the beginning stripTrailing() - Removes the white space from the end strip() - Removes the white space from both, beginning and the end of string In particular, strip() looks very similar to trim() . As per this article strip*()

Allow insecure HTTPS connection for Java JDK 11 HttpClient

余生颓废 提交于 2019-11-27 02:13:03
问题 Sometimes it is needed to allow insecure HTTPS connections, e.g. in some web-crawling applications which should work with any site. I used one such solution with old HttpsURLConnection API which was recently superseded by the new HttpClient API in JDK 11. What is the way to allow insecure HTTPS connections (self-signed or expired certificate) with this new API? UPD: The code I tried (in Kotlin but maps directly to Java): val trustAllCerts = arrayOf<TrustManager>(object: X509TrustManager {

Where is JRE 11? [duplicate]

拟墨画扇 提交于 2019-11-27 01:35:55
问题 This question already has an answer here: How to get java 11 run-time environment working since there is no more jre 11 for download? 3 answers UPDATE: (to be more clear ) You can find JRE 8, JRE 9 and JRE 10 on Oracle's official website (click on each). But where is JRE 11 ?! Also, JDK 11 doesn't include a JRE. I was expecting JRE to be installed with JDK. Do final users of our apps need to install JDK? ORIGINAL version of the question: I downloaded and installed Oracle JDK 11 from its

How to use jdk without jre in Java 11 [duplicate]

风流意气都作罢 提交于 2019-11-26 22:35:09
问题 This question already has an answer here: How to get java 11 run-time environment working since there is no more jre 11 for download? 3 answers We are planning to migrate our Java 8 project to use Java 11. But I noticed that Java 11 doesn't have a JRE folder. In Java 9 and Java 10, folder structures are changed i.e. java\jdk1.x or java\jre1.x , where x is java 9 or 10. But in Java 11, I am getting only one folder, i.e. java\jdk-11 . How will my client use my application without jre? What I

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

自古美人都是妖i 提交于 2019-11-26 22:07:17
This question already has an answer here: How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9 23 answers Replacements for deprecated JPMS modules with Java EE APIs 7 answers I'm trying to deserialize XML data into a Java content tree using JAXB , validating the XML data as it is unmarshalled: try { JAXBContext context = JAXBContext.newInstance("com.acme.foo"); Unmarshaller unmarshaller = context.createUnmarshaller(); unmarshaller.setSchema(schema); FooObject fooObj = (FooObject) unmarshaller.unmarshal(new File("foo.xml")); } catch (UnmarshalException ex) { ex

Minimum Spring version compatible with Java 11

≡放荡痞女 提交于 2019-11-26 17:58:42
I need to upgrade an app to Java 11 very soon, I was wondering what's the minimum Spring version that is compatible with Java 11. I'm currently using Java 8 and Spring 4.2.7. From their task tracker -- SPR-16391:Compatibility with JDK 11 . The compatibility of JDK 10, 11 is planned along with 5.1 GA release. JDK 11 is currently scheduled for September 2018. Not expecting any major changes beyond JDK 10 from our perspective, we should be able to fully support it in the 5.1 line already. Ideally our framework build would be able to run on JDK 8, 9, 10 as well as 11, even if our own test efforts

JavaFX 11 : Create a jar file with Gradle

天大地大妈咪最大 提交于 2019-11-26 17:49:43
I am trying to upgrade a JavaFX project from the 8 Java version to the 11 version. It works when I use the "run" Gradle task ( I followed the Openjfx tutorial ), but when I build (with the "jar" Gradle task) and execute (with "java -jar") a jar file, the message "Error: JavaFX runtime components are missing, and are required to run this application" appears. Here is my build.gradle file : group 'Project' version '1.0' apply plugin: 'java' sourceCompatibility = 1.11 repositories { mavenCentral() } def currentOS = org.gradle.internal.os.OperatingSystem.current() def platform if (currentOS

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

旧巷老猫 提交于 2019-11-26 17:27:38
问题 This question already has answers here : How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9 (29 answers) Replacements for deprecated JPMS modules with Java EE APIs (7 answers) Closed last year . I'm trying to deserialize XML data into a Java content tree using JAXB, validating the XML data as it is unmarshalled: try { JAXBContext context = JAXBContext.newInstance("com.acme.foo"); Unmarshaller unmarshaller = context.createUnmarshaller(); unmarshaller

JavaFX module javafx.graphics

筅森魡賤 提交于 2019-11-26 17:09:11
问题 Upon fixing a requires issue with robot.awt I've now encountered another problem upon running my application. Application builds with no issues. Stack trace : Exception in Application constructor Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect