java-11

Is log4j2 compatible with Java 11?

☆樱花仙子☆ 提交于 2019-12-01 02:32:46
I tried to run my project on the latest Java 11. Everything works, except the specific file logger. Logging works fine on previous Java versions - 10, 9, 8, but not on Java 11. During server run I see only 1 warning: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. Here is my configuration: <Configuration> <Appenders> <RollingFile name="postgresDBLog" fileName="${sys:logs.folder}/postgres.log" filePattern="${sys:logs.folder}/archive/postgres.log.%d{yyyy-MM-dd}"> <PatternLayout> <pattern>%d{HH:mm:ss.SSS} - %msg%n</pattern> </PatternLayout> <Policies

How to fix jfoenix modules with javafx 11

对着背影说爱祢 提交于 2019-12-01 02:22:52
问题 So I'm adding my requires for module-info.java and finally got my program to load but as soon as tab pane wants to load from jfoenix library this error is thrown. 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 回答1: One way you can

How to log request/response using java.net.http.HttpClient?

落花浮王杯 提交于 2019-11-30 19:32:50
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 commons asks while making a HTTP call is logging of request/response. How would you do that using the HttpClient , without of course, logging it manually in every single call? Is there an interceptor mechanism like that offered by all other HTTP clients? If we look at jdk.internal.net.http.common.DebugLogger source code we can see a few loggers using System.Logger , which in turn will use System

Java11 / JavaFX and Maven will not run outside of NetBeans IDE 9

China☆狼群 提交于 2019-11-30 17:46:16
As per JavaFX deployment library not found in active JDK I used José Pereda Maven approach and it works well in NetBeans but as soon as I try and run it outside with "java -jar mavenproject1-1.0-SNAPSHOT-jar-with-dependencies.jar" I get the following error "Error: JavaFX runtime components are missing, and are required to run this application" The "md.mavenproject1.MainApp" is just a temp name while I try and figure this out. My pom file looks like: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

Unable to use Lombok with Java 11

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 17:00:52
We upgraded the Java version from 8 to 11 but I got compile errors of getter/setter methods where I implemented the POJO classes with Lombok's Getter and Setter Annotations. Is there a way to use Lombok's @Data annotation which provides getter and setter without implementing them at Java 11? Currently, I am facing the error: unable to find getStoreName() where storeName was declared as a global variable in the class with @Data Lombok annotation above the class. TL;DR Upgrade Lombok as a dependency and as a IDE plugin ( IntelliJ , NetBeans , Eclipse ) and enable Annotation Processing in IDEs

Is log4j2 compatible with Java 11?

泄露秘密 提交于 2019-11-30 16:33:19
问题 I tried to run my project on the latest Java 11. Everything works, except the specific file logger. Logging works fine on previous Java versions - 10, 9, 8, but not on Java 11. During server run I see only 1 warning: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. Here is my configuration: <Configuration> <Appenders> <RollingFile name="postgresDBLog" fileName="${sys:logs.folder}/postgres.log" filePattern="${sys:logs.folder}/archive/postgres.log.

How to run Wildfly 14 with java 11?

*爱你&永不变心* 提交于 2019-11-30 13:51:28
I'm using Wildfly 14 and Java 11 in its runtime configuration. When I start the server I get org.jboss.modules.ModuleNotFoundException: java.se at org.jboss.modules.Module.addPaths(Module.java:1266) at org.jboss.modules.Module.link(Module.java:1622) at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650) at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:296) at org.jboss.modules.Main.main(Main.java:437) How do I run Wildfly 14 with java 11? There was some change in Java 11 where java.se must be read on the module path. In Wildfly's run configuration under VM arguments add

Java 11 JShell inside Intellij IDEA

假装没事ソ 提交于 2019-11-30 11:45:55
I have Java 11 JDK and IntelliJ IDEA 2018.2.4 (64-bit). When I was using Java 10.0.2, the JShell console in IntelliJ IDEA worked fine. Now that I've upgraded to Java 11, the JShell console has stopped working. Nothing at all happens when I click on the Run button or when I hit Ctrl+Enter (see screenshot). My projects compile and run just fine using Java 11 - it's only the JShell console that doesn't work. (Also, JShell works fine from the Command Prompt, it's only inside IDEA that it doesn't work.) I can reproduce this issue on two machines, one at home running IDEA Community Edition 2018.2.4

Eclipse 2018-09 won't compile Java 11 source; thinks it is below 1.7

↘锁芯ラ 提交于 2019-11-30 11:26:47
I'm running Eclipse 2018-09 (4.9.0) on Windows 10. I'm using Open JDK 11 GA. I have a Maven project that was specified as using Java 8 source code. <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> That compiles fine using Maven 3.5.3 on the command line. That also compiles fine using Eclipse Eclipse 2018-09 (4.9.0). I changed the compile Java versions to Java 11: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven

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

柔情痞子 提交于 2019-11-30 07:10:48
问题 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. 回答1: List of your <arguments, current mapping, reasons> is as follows: -XX: