java-9

JaCoCo and MR Jars

雨燕双飞 提交于 2019-12-14 00:24:05
问题 There is an issue with JaCoCo and the MultiRelease JAR files. Since the same class name exist on two places, JaCoCo complains: Caused by: java.lang.IllegalStateException: Can't add different class with same name: jodd/core/JavaBridge at org.jacoco.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:107) at org.jacoco.core.analysis.Analyzer$1.visitEnd(Analyzer.java:96) How we can tell JaCoCo (in Gradle) to skip the classes from META-INF path? OR to behave like it should (use

jdeprscan throws cannot find class error

我只是一个虾纸丫 提交于 2019-12-13 17:23:59
问题 I'm trying jdeprscan on my CentOS system. Here are the commands that I'm executing: export classpath=<PATH/*>:<ANOTHER/PATH/*>:<SOME/OTHER/PATH/*> jdeprscan --for-removal --verbose --class-path $classpath --release 9 <ANOTHER/PATH>/MyProject.jar In spite of providing the classpath, I'm getting multiple errors of this sort Processing class <some/class/in/MyProject.jar>... error: cannot find class <some/class/in/a/different/jar> error: cannot resolve Methodref <some/class/in/a/different/jar>.

java application not working with java9 and eclipse

我的梦境 提交于 2019-12-13 13:25:15
问题 I am trying to create a HelloWorld module of Java9 following steps were given below. File>New>Java Project Right-click project(i.e. com.hello)>New>Source Folder>enter source folder name (.e. com.hello ) Right click Source Folder(i.e. com.hello)>New>Package>enter name(same as source folder name i.e com.hello) Right click Source Folder(i.e. com.hello)>New>File>enter file name (java9 standard file name for module which is module-info.java) module com.hello { exports com.hello; } Right Click

Why does Maven shade plugin remove module-info.class?

走远了吗. 提交于 2019-12-13 13:00:38
问题 I try to use maven-shade-plugin for a modular jar: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.1.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> <configuration> <minimizeJar>true</minimizeJar> <artifactSet> <includes> <include>javax.xml.bind:jaxb-api</include> <include>com.sun.xml.bind:jaxb-impl</include> </includes> </artifactSet> <relocations>

Hibernate, Java 9 and SystemException

扶醉桌前 提交于 2019-12-13 12:22:36
问题 I've been trying to run Hibernate 5.2.11 application in Java 9/Spring Boot 1.5.x/Maven project but I'm failing at missing class: Caused by: java.lang.NoClassDefFoundError: javax/transaction/SystemException at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at org.jboss.logging.Logger$1.run(Logger.java:2554) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.jboss.logging.Logger.getMessageLogger(Logger.java:2529

Java 9 Multithreaded HTTP request

天涯浪子 提交于 2019-12-13 09:35:22
问题 I can't figure out how to covert the following sequential code to a multi-threaded properly. I have done my best to avoid any shared resource and complete thread independence. This is the single-threaded code package com.net; import jdk.incubator.http.HttpClient; import jdk.incubator.http.HttpRequest; import jdk.incubator.http.HttpResponse; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; public class

Adding JAVA to Eclipse Oxygen

守給你的承諾、 提交于 2019-12-13 03:36:10
问题 I already installed java jdk 9 and Eclipse Oxygen on my pc. I've also added jdk url in environment variable path and created JAVA_HOME variable. I ran cmd and entered javac command, everything went fine. 1. Now, when I right click on a project > then go to Properties, I am redirected to Builders tab. I don't know where to add the JRE_SYSTEM_LIBRARY on my Eclipse Oxygen. 2. Also, when I want to create new project, by going to File > New, there's no suggestion to add a Java Project 3. When I go

Hibernate 5.2.10: Unable to perform unmarshalling [duplicate]

▼魔方 西西 提交于 2019-12-13 03:07:47
问题 This question already has answers here : How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9 (29 answers) Closed 2 years ago . Edit 5: Solved The main problem was that I've used JDK 9, where the JAXB APIs are no longer on on the default class path. Here is link where I've found solution. I used hibernate version 4.3.6 from example tutorial and everything've worked good, but when I update version to 5.2.10 I have problem (I know that code responsible for

NoClassDefFoundError: Tests fail during Maven test phase when SureFire forkCount is greater than 0

本秂侑毒 提交于 2019-12-13 00:23:05
问题 Issue Java 9 / Java 10 Module Mode: Tests failing due to initializationError: java.lang.NoClassDefFoundError: Could not initialize class org.springframework.test.context.junit4.SpringRunner when SureFire forkCount > 0 Spring Boot: 2.0.1.RELEASE Java: "10" 2018-03-20 (Vendor: Oracle Corporation) Maven: 3.5.3 maven-compiler-plugin: 3.7.0 maven-surefire-plugin: 2.21.0 macOS: 10.12.6 Relevant stack trace [INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ turbo --- [INFO] [INFO] -------

Illegal reflective access operation

左心房为你撑大大i 提交于 2019-12-12 20:45:03
问题 I'm trying to figure out why React Native suddenly will not work on my 2014 era Macbook. It was working earlier in August. I get the following error when trying to run react-native run-android from the command line. The app runs when I open it in Android Studio 3.0 just fine, no errors. Any ideas what I can look at to resolve this? Scanning 563 folders for symlinks in /Users/username/ReactNative/Wtf/node_modules (5ms) JS server already running. Building and installing the app on the device