java-11

Patching java.base results in java.lang.LinkageError

流过昼夜 提交于 2020-01-13 11:09:09
问题 I am trying to do the same thing in Java 11 that could be done with -Xbootclasspath/p:path in pre java 9. As a simple example I modified one of the valueOf methods of java.lang.Integer and compiled the project with: javac --module-source-path=src/java.base --patch-module java.base=src/java.base -d mods $(find src -name '*.java') I then ran a simple sample using: java --patch-module java.base=<pathToMyModifiedJavaBaseClasses> -p lib -m my.moduleA/my.moduleA.Main That worked an I'm seeing the

Sonar scanner with Maven and JDK 11

依然范特西╮ 提交于 2020-01-13 10:56:30
问题 I can make Sonar scanner work with OpenJDK 8 but not with OpenJDK 11. The Maven command used is: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -Dsonar.analysis.mode=preview -Dsonar.report.export.path=sonar-report.json -P ci The build fails with: [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project framework-bio: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0

Install Java 11 OpenJDK on Windows (a system path issue)

大憨熊 提交于 2020-01-13 04:27:16
问题 Java 11 had recently arrived and, as everybody knows, this version has no installation file. To install Java without installer I, of course, had set my system settings PATH and JAVA HOME to the address of the folder where my Java 11 was unzipped (advised by accepted reponses to similar questions). The only thing is that all those advices about system settings make no effect whatsoever on my machine: Checking with a command line outputs my old Java 9 version With Java 9 removed from the folder

Why is OpenJDK 11 Java garbage collector *decreasing* free memory in this sample program?

我与影子孤独终老i 提交于 2020-01-12 18:52:12
问题 When I compile and run the following very simple Java program using OpenJDK 11 (Zulu distribution on Windows 10): public class GCTest { public static void main(String[] args) { System.out.println("Free memory before garbage collection: " + Runtime.getRuntime().freeMemory()); Runtime.getRuntime().gc(); System.out.println("Free memory after garbage collection: " + Runtime.getRuntime().freeMemory()); } } it looks like garbage collection is decreasing the amount of free memory: Free memory before

ZonedDateTime change behavior jdk 8/11

≡放荡痞女 提交于 2020-01-12 10:28:19
问题 I am migrating an application from jdk 8 to 11 and I can see ZonedDateTime change is behavior about daylight saving time. JDK8 ZonedDateTime parse = ZonedDateTime.parse("2037-05-10T19:15:00.000+01:00[Europe/Paris]"); System.out.println(parse); output: 2037-05-10T19:15+02:00[Europe/Paris] JDK11/12 ZonedDateTime parse = ZonedDateTime.parse("2037-05-10T19:15:00.000+01:00[Europe/Paris]"); System.out.println(parse); 2037-05-10T20:15+02:00[Europe/Paris] Can someone explain to me why did they change

ZonedDateTime change behavior jdk 8/11

穿精又带淫゛_ 提交于 2020-01-12 10:27:12
问题 I am migrating an application from jdk 8 to 11 and I can see ZonedDateTime change is behavior about daylight saving time. JDK8 ZonedDateTime parse = ZonedDateTime.parse("2037-05-10T19:15:00.000+01:00[Europe/Paris]"); System.out.println(parse); output: 2037-05-10T19:15+02:00[Europe/Paris] JDK11/12 ZonedDateTime parse = ZonedDateTime.parse("2037-05-10T19:15:00.000+01:00[Europe/Paris]"); System.out.println(parse); 2037-05-10T20:15+02:00[Europe/Paris] Can someone explain to me why did they change

create a JAVA Standalone executable application to run on different platforms without any Installation

人盡茶涼 提交于 2020-01-12 07:59:25
问题 I have created a run time image for my Java application using jlink and I would like to be able to ship my app as an executable to different platforms. Ideally, it would be a single file that a user can double click and start the application without the need for installing anything. Is there currently a good way to do this? 回答1: You can make an installer that installs the JDK and the application. Make the application an exe by using something like Launch4j and for a Mac executable follow this

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

自闭症网瘾萝莉.ら 提交于 2020-01-10 03:52:25
问题 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

Migration to Jakarta: ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl

限于喜欢 提交于 2020-01-05 05:27:29
问题 While migrating from Java 8 to Java 11 and switching from EE to the newest Jakarta libraries according to https://wiki.eclipse.org/New_Maven_Coordinates and Maven central, we get the following runtime exception in our (still SOAP-based) client application: Exception in thread "main" javax.xml.ws.WebServiceException: Provider com.sun.xml.internal.ws.spi.ProviderImpl not found at javax.xml.ws.spi.FactoryFinder$1.createException(FactoryFinder.java:31) at javax.xml.ws.spi.FactoryFinder$1

Mixed Modular and Non-Modular Development in Eclipse using Java 11

…衆ロ難τιáo~ 提交于 2020-01-04 14:03:15
问题 It's been a while since I do Java programming and I am surprised to come back to it with the entire landscape being foreign to me post project jig-saw. I have trouble using Eclipse (2018-09, 4.9.0) standard Java project with mixed modular and non-modular environment. Specifically, I am attempting to combine JavaFX 11 (modularized) and Apache POI 4.1 (non-modularized) using Eclipse platform (base Java project without Gradle or Maven). In my module-info.java I have the following, module myapp {