Questions tagged [java-9]

3

votes
0

answer
31

Views

When JRE was completely discontinued as separate offering?

Starting from Java 9 the module system was introduced, making provision of JRE separately redundant. Through, it seems that it was still possible to download it. For example, from here now Java 9 archive Also, here it's only stated that : Restructure the JDK and JRE run-time images to draw a clear d...
anasmi
1

votes
1

answer
214

Views

Migrate from java 8 to java 9

I want to upgrade my java version from 8 to 9 in my pat project, but I can't find java9 in oracle site, I see the following Java SE 9 has reached end of support. Users of Java SE 9 should switch to Java SE 10. Please visit our Java SE Downloads page to get the current version of Java SE. You will b...
1

votes
1

answer
29

Views

How Jshell works without semicolon at end of line

I'm new for java 9 and just practicing some snippet of code on jshell jshell> System.out.println('hello'); hello jshell> System.out.println('hello') hello In the both the cases I'm getting output of hello but jshell works without semicolon at end of line. I know java need semicolon
app
0

votes
2

answer
28

Views

Efficient Java construct for Arraylist Processing and calling different methods

Please, Is there an elegant and efficient way of doing the following in Post Java 8 i.e. 1. Looping through an arraylist 2. Reading the object 3. Calling different methods of potentially different objects using the values contained in the arraylist items I did look at streams, switch statement, but...
olatom
1

votes
1

answer
227

Views

Inclusive takeWhile() for Streams

I want to know if there is a way to add the last element of the stream that was tested against the condition of the method takeWhile(). I believe I want to achieve something similar to RxJava's takeUntil() method. I'm guessing there is no direct way to do this (correct me if I am mistaken), but I wo...
HiGuys
1

votes
0

answer
509

Views

Cobertura does not work with Java 9

I have been using Java 8, now trying to upgrade to java 9. Most of the things works except generation of unit test cases report, I am using Cobertura. With Java 9 I get following error, seems like Cobertura still references tools.jar which is removed from Java 9. Failed to execute goal on *****: Co...
Atul Sureka
1

votes
0

answer
164

Views

Oracle JDK 9 - convert exe into zip - src.zip is missing

We need to add some settings to the jdk the developers use. For java 8 its encryption and truststore certificates, for java 9 its only additional truststore certificates. We have a batch file to convert the installer exe into a zip, which works fine (using 7zip to extract the .exe file, then the too...
wemu
1

votes
0

answer
263

Views

Plugin Compatibility Issue Eclipse Oxygen (4.7) and Java 9

We upgraded one of our Eclipse 3.x plugins to work with Java 9. But when we generated the plugin update site content, and used Eclipse Update functionality to install the new version of the plugin, we encountered the following error in Eclipse Oxygen. Removing part descriptor with the 'pluginxxx....
muratozyurt
1

votes
0

answer
123

Views

Java JVM crash after webview file upload

I want to implement file drag and upload in java webview, however, it keeps crashing JVM when any type of upload is initiated. Tested on latest JDK 8 and 9 on windows 10. I'm lost as to what can be causing this issue. import javafx.application.Application; import javafx.scene.Scene; import javafx.sc...
Shawn
1

votes
0

answer
142

Views

JDK 9 SIGSEGV Fatal Error

Running eclipse plugin with a WebView component ends with SIGSEGV error, which happens to be an ancient bug as in here. # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x000000013a06a254, pid=23881, tid=775 # # JRE version: Java(TM) SE Runtime Environment...
muratozyurt
1

votes
0

answer
1.1k

Views

Add directory to classpath at runtime in Java 9

I am using OpenOffice API and one of the requirements to prevent the exception java.lang.UnsatisfiedLinkError: com.sun.star.lib.connections.pipe.PipeConnection.createJNI is to add OpenOffice's directory path to classpath. This code below used to work in versions
lucasdc
1

votes
0

answer
631

Views

Gradle Multi Project with Java 9 and Java 8

I would like to migrate a gradle multi project to java 9. Instead of trying a big bang I would like to go step by step. My idea is to start from top (main module) and then work my way down. This implies, that I will have a main module in Java 9 while others are still in Java 8. If my info is correct...
magicroomy
1

votes
1

answer
108

Views

Is Deltaspike compatible with Java 9?

According to its doc Deltaspike Data uses ASM: As of DeltaSpike v1.4.0, the Data module internally leverages the Proxy module, which wraps ASM 5. No external dependencies required, and now we have full support for interceptors on partial beans. It seems that ASM 6 has been released with Java 9 suppo...
user140547
1

votes
0

answer
428

Views

Can VisualVM profile Java 9 applications?

Hello I am trying to optimise my application, I've had JProfiler installed for the last 2 weeks but the trial period is up and I can't afford the megabucks. I want to use VisualVM but I can't get it to work. I installed version 1.4 from their website but when I try and open my application for profil...
Duane Allman
1

votes
1

answer
3.3k

Views

Error running App: No JDK specified

I have installed Android studio 3.0.1 and when i run the app he gives me an error Error running App: No JDK specified Note that i have installed JDK 9 and I made two environment variable JAVA_HOME and JDK_HOME and edit path variable and in project structure I choose JDK 9 but I am also failed to ru...
karim alaa
1

votes
0

answer
76

Views

HttpRequest .setHeader Value to authorization failure in Java

There is a minor problem with jdk9.incubator.HttpRequest.Builder It seems like I cannot set headers with authorization key. Below code is for APNs token authentication. request.setHeader('authorization', 'bearer ' + token); I found that the word authorization is blocked in the source code private st...
John
1

votes
0

answer
940

Views

Failing to Install Bouncycastle provider

I am running on Java 9 and tried to execute a program with following line. Security.getProvider('BC'); However, this returns null. As a solution I tried following line. Security.addProvider(new BouncyCastleProvider()); But it gives me an error saying, java.lang.NoClassDefFoundError: org/bouncycastl...
Chamila Wijayarathna
1

votes
0

answer
174

Views

javac: invalid flag: -Xlint:-sunapi | JDK 9

Arguments passed to javac are as follows: [javac] Using modern compiler [javac] Compilation arguments: [javac] '-deprecation' [javac] '-d' [javac] '..' [javac] '-classpath' [javac] '..' [javac] '-sourcepath' [javac] '..' [javac] '-g' [javac] '-XDenableSunApiLintControl' [javac] '-Xlint:-sunapi' Whic...
Gayan Weerakutti
1

votes
0

answer
464

Views

How to use --patch-module along with --class-path | javac

How can I use a custom classpath when overriding a native class like java.util.regex.Matcher in a non-modular code base. Basically what I want to do is to use a different class path like --class-path build/custom when patching a class. Because the modified Matcher.java have references to classes th...
Gayan Weerakutti
1

votes
0

answer
176

Views

How to declare a module-info file in Test source root in intellij IDEA 2017.3

The test source root don't seems like to inherit the module-info file from the source, which made testing with requirement of jdk.incubator.http.HttpClient impossible to build, how do I fix it? build error message: Error:(1, 21) java: package jdk.incubator.http is not visible (package jdk.incubator....
wusatosi
1

votes
1

answer
261

Views

JDK9 Packager: Create image without runtime

When using the Java Packager in Java 8, one had the choice to not include a runtime in the resulting image (see for example this question). I'm trying to achieve the same (using the ant tasks described over here). However I don't know how to not include the JVM in the resulting .app or .exe file. .....
Sebastian S
1

votes
1

answer
5.8k

Views

WARNING: An illegal reflective access operation has occurred (portable opencv in java)

I want to make a portable opencv application which the dependency is added to maven file pom.xml. Simplified code is : import org.opencv.core.Mat; public class Builder { public static void main(String[] args) { nu.pattern.OpenCV.loadShared(); System.loadLibrary(org.opencv.core.Core.NATIVE_LIBRARY_N...
Martin
1

votes
0

answer
72

Views

setBackground function moves the JDialog/Jframe from the center in Java9

I am using following code to display a splash screen. Following works great in Java 8. But in Java 9, I observed the splash screen is not in the center anymore but towards the top left side. dialog = new JDialog(); dialog.setModal(false); dialog.setUndecorated(true); dialog.getRootPane().setOpaque(...
user1631306
1

votes
0

answer
224

Views

Unable to find taglib with Tomcat 9 and java run time 9

I am using Tomcat 9 with Java 9 as run time and java 8 as compile time. I am facing below issue in accessing my jsp page. I am unable to find what is causing this issue. Any lead will be very helpful. Please note that batch_funcations.tld is present in webapps/ROOT/META-INF folder. org.apache.jasper...
learner
1

votes
1

answer
1.1k

Views

Java 9 and tomcat 7.0.73

I am running my java application with java 9 and tomcat 7.0.73 and I am getting following in my catalina.out file. Is there any work around to avoid it? Can you please help me understand the impact of this error. My application is coming up properly. Also why GC daemon thread is created during t...
learner
1

votes
0

answer
272

Views

JAVA 9 + spring-boot 2.0 + maven 3.5.3, meet ERROR package com.sun.org.apache.xerces.internal.parsers is not visible

I execute spring-boot:run command successfully in java 9 + spring-boot 2.0 + maven 3.5.3. I want to migrate project java 7 to java 9. My project has many library dependencies, and compiles by java 6 or 7. I know internal api is a problem. So I added a class for testing and run it. It failed like bel...
Songkey
1

votes
1

answer
150

Views

Java 9 Module System

I'm trying to learn the new module features of java 9. I don't think I'm doing the requires/exports thing right because intelliJ is giving me red text on my imports unless I add the dependencies in the project structure window, which I'm pretty sure is the wrong way to go. Below is my file structure...
HahnSolo
1

votes
0

answer
133

Views

jdk.vm.ci.common.JVMCIError: no JVMCI compiler selected with Java9 but not in Java10

I am trying to experiment with the JVMCI and its existence in the JDK using the following from a mailing list- private static void JVMCIQueries() { // Check if the JDK used supports JVMCI? String vm_version = System.getProperty('java.vm.version'); System.out.printf('java.vm.version = %s%n', vm_versi...
Naman
1

votes
1

answer
150

Views

MultiView FXML Project on iOS using Gluon-mobile and Java9

Creating a completely new MultiView FXML Project and then adding the Java9 necessities in Gradle: buildscript { repositories { jcenter() google() maven{ url 'http://nexus.gluonhq.com/nexus/content/repositories/releases' } } dependencies { classpath 'org.javafxports:jfxmobile-plugin:2.0.5' } } ... s...
Viktor Stojanov
1

votes
2

answer
290

Views

How to run code on jre9 that was compiled with jdk8 and use Unsafe

I have code that was compiled with jdk8 as target and source for java 1.8 and use Unsafe. I tried to run this program with jdk9 but it fails with following exception: java.lang.NoSuchMethodError: sun.misc.Unsafe.getByte Package sun.misc.Unsafe is not removed from jdk9, so I expected the code to run....
HPCS
1

votes
1

answer
338

Views

Java 9: module not found: primefaces

I am migrating a webapp project to Java 9 which uses primefaces. In the maven pom.xml primefaces was declared already properly: org.primefaces primefaces 6.0 ... In module-info.java I added - as indicated by IntelliJ - a 'requires primefaces;'. So it looks: module sharedwebapp { ... requires primefa...
jahuer1
1

votes
2

answer
290

Views

Error Launching IDEA (Intellij)

When i've restarted my computer, i've tried to open Intellij and i've got this error message : failed to create jvm error code -1 i've added 'IDEA_JDK_64' and still have the issue, i can't start intellij, can someone Help Please (NB : it's working with Eclipse actually )
Steeve
1

votes
1

answer
396

Views

Does Japser Reports work with Java9

Im having trouble using Japser Reports with Java 9. My JasperVersions: 6.5.1 When trying to build my Report i get the following error Message: An internal error occurred during: 'Building report'. java.lang.UnsupportedClassVersionError: my/path/to/my/class/User has been compiled by a more recent ver...
Marcus Lanvers
1

votes
1

answer
87

Views

JDK9 NetBeans Dev - compile error during JNI Tutorial

I have searched the entire web throughly for almost two days now and couldn't come up with a solution to my problem. I hope you guys can help me. This might be a little specific but I am sure sooner or later others will experience the same problems. I am currently using NetBeans Dev (Build 201803200...
el platin
1

votes
1

answer
559

Views

two module-info.java in one package

I want to make work the project with two module inside one package. There is package com.test which include test1 and test2. This code is note compile because: Error:Multiple module-info files in module 'Java9Test' What is not correct? test1 contains module-info.java module com.test.test1 {} and C...
Petro
1

votes
1

answer
78

Views

Oracle JDK 9 get AgentLoadException

I am using Oracle Jdk 9.0.4 and Jmockit. However, when I add -Djdk.attach.allowAttachSelf in my VM argument for my test file, I got the following errors. java.lang.IllegalStateException: com.sun.tools.attach.AgentLoadException: Agent JAR not found or no Agent-Class attribute Caused by: com.sun.tool...
Laodao
1

votes
0

answer
68

Views

Java 8 and ignoring --release in compiler

I have a project that has to be dual compiled to java 8 and java 9. And it fails because in case of java 9 we are using --release flag. Is it possible for javac to ignore unknown flags (and not exit with error)?
Krzysztof Krasoń
1

votes
0

answer
453

Views

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

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) Mave...
testphreak
1

votes
0

answer
241

Views

Merge jars for split package using gradle

I created a web application. I am using Gradle. I am new to Gradle and I am trying to migrate one of my projects to Java 9 module system. I moved all the jars to module path instead of the classpath. Here is the snippet of my build.gradle plugins { id 'java-library' id 'eclipse-wtp' id 'war' } ext {...
Basit
1

votes
1

answer
154

Views

Java 9 migration on intellij issues with module system

I am try to migrate my current project to be able to compile and run it on java 9. I am trying first to just move a java8 based project to java9 without not much effort which means not moving to jigsaw basically. The project structure is something like myjava-service [myjava-service-parent] parent-p...
Eric Nascimento

View additional questions