java-9

Is it accurate to say that older versions of Jetty cannot be made to work with Java 9 just by configuration changes

╄→гoц情女王★ 提交于 2019-12-07 13:23:57
问题 Trying to run a fairly old project Mamute with Java 9. I was able to get around some initial errors by using --add-modules java.xml.bind but Mamute uses an older version of Jetty (8.1.0.v20120127) and I am seeing PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved This discussion around this thread would seem to indicate using Jetty with Java 9 is only possible with back-ported code changes and not by changing configuration. Is that correct? 回答1: To what I've

Using Ignite on JDK 9

帅比萌擦擦* 提交于 2019-12-07 11:36:56
问题 I am having trouble using Ignite on JDK 9. I have the following minimal testcase: package no.ovstetun.ignite; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.junit.Test; public class FailingIgniteTest { @Test public void failingIgnite() { TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi(); } } This code sample fails with the following stacktrace: java.lang.ExceptionInInitializerError at org.apache.ignite.internal.util.IgniteUtils.<clinit>(IgniteUtils.java:769) at org

How to create multi-release jar and filtering input content?

空扰寡人 提交于 2019-12-07 10:14:08
问题 I would like to create multi-release jar (for Java 8 and Java 9) by jar command. There are several Netbeans IDE projects: com.jdojo.mrjar.jdk8, com.jdojo.mrjar.jdk9. Projects source code is here. Using command line I go to a parent folder and run command. When I try to do this: jar --create --file mrjars/com.jdojo.mrjar.jar -C com.jdojo.mrjar.jdk8/build/classes . --release 9 -C com.jdojo.mrjar.jdk9/build/classes . I get a message: Warning: entry META-INF/versions/9/.netbeans_automatic_build

Could not instrument class IllegalArgumentException

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 10:08:10
问题 While learning and exploring Java 9 from eclipse. I create a simple project in eclipse, Although when I compile the project, it prints the program's expected result but along following exception too. Could not instrument class mymodule/App: java.lang.IllegalArgumentException at org.eclipse.jdt.launching.internal.org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.eclipse.jdt.launching.internal.weaving.ClassfileTransformer.transform(ClassfileTransformer.java:25) at org.eclipse.jdt

jshell - unable to find printf

这一生的挚爱 提交于 2019-12-07 09:23:30
问题 Why does my jshell instance (JDK Version 9-ea) unable to identify printf() statement ? Below is the error I observe, jshell> printf("Print number one - %d",1) | Error: | cannot find symbol | symbol: method printf(java.lang.String,int) | printf("Print number one - %d",1) | ^----^ I am able to access printf, provided I specify it in a regular way. jshell> System.out.printf("Print number one - %d",1) Print number one - 1$1 ==> java.io.PrintStream@1efbd816 Any pointers? 回答1: An earlier version of

Set JVM option for avoid error Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-12-07 09:00:51
问题 This question already has answers here : JDK9: An illegal reflective access operation has occurred. org.python.core.PySystemState (7 answers) Closed last year . I use Spring Boot 2.0.0.RC1, JDK 9.0.4, IntelliJ IDEA 2017.3.4 Ultimate, Gradle 4.5.1 . Spring Boot RC1 version (strictly, Spring Framework 5.0.3.RELEASE) has a known issue: https://jira.spring.io/browse/SPR-15859 , I also see it at here https://github.com/dsyer/spring-boot-java-9#create-a-spring-boot-application Spring developer

removing java.endorsed.dirs from Tomcat on Eclipse with Java 9 and Java 10

六眼飞鱼酱① 提交于 2019-12-07 08:15:24
问题 I'm using Eclipse 4.7.3a with Tomcat 9.0.4 in the IDE. I upgraded from Java 8 to Java 10. I changed my JAVA_HOME to point to the JDK 10 installation. I went into Eclipse and created a new JDK installed JRE pointing at the Java 10 JDK, and selected it. I rebuilt my project, and tried to start the Tomcat server I had. It said: -Djava.endorsed.dirs=C:\bin\tomcat\endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable

How to get a Module object from a ModuleReference

两盒软妹~` 提交于 2019-12-07 07:46:02
问题 Using the code: ModuleFinder.of(Paths.get(path)).findAll() I am able to retrieve a Set<ModuleReference> of all the .jars in the path folder. My next step would be getting a Module from a ModuleReference but there's no method that returns that, I can get a ModuleDescriptor but even that one doesn't help. Is there a way to do this? 回答1: If you desire to access the module content you should open the ModuleReference that you've attained. This would provide you access to the ModuleReader which is

java.lang.ClassNotFoundException: sun.misc.Cleaner

匆匆过客 提交于 2019-12-07 06:36:31
问题 When using Undertow 1.4.20 (as embedded Servlet engine), i get this exception when running our app under Java 9.=: java.lang.ClassNotFoundException: sun.misc.Cleaner Cause is this line in io.undertow.server.DirectByteBufferDeallocator : tmpCleanerClean = Class.forName("sun.misc.Cleaner").getMethod("clean"); This class does indeed not exists anymore in Java 9. But a replacement is available: java.lang.ref.Cleaner Can i ignore this exception for now? Is there a timeline for fixing this (i.e.

Java 9 - add jar dynamically at runtime

被刻印的时光 ゝ 提交于 2019-12-07 04:56:20
问题 I've got a classloader problem with Java 9. This code worked with previous Java versions: private static void addNewURL(URL u) throws IOException { final Class[] newParameters = new Class[]{URL.class}; URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class newClass = URLClassLoader.class; try { Method method = newClass.getDeclaredMethod("addNewURL", newParameters ); method.setAccessible(true); method.invoke(urlClassLoader, new Object[]{u}); } catch