Data dodania Pytanie
2018-02-05 13:02 JFrame scaling in Java 9 »
Exactly the same code running under Java 9u4 on the left and 8u144 on the right on Windows 7. Java 9 seems to making the window larger. What is cau...
(1) odpowiedzi
2018-02-03 00:02 Java 8/9: Can a character in a String be mapped to its indices (using streams)? »
Given a String s and a char c, I'm curious if there exists some method of producing a List<Integer> list from s (where the elements within list ...
(4) odpowiedzi
2018-01-21 10:01 Java9 HttpClient SSLHandshakeException »
I am trying to test new HttpClient from Java 9. For test purpose I am using api provided by https://jsonplaceholder.typicode.com. However, I am receiv...
(1) odpowiedzi
2018-01-18 17:01 Querying swap space in java 9 »
Due to a bug in the sigar library version I am using (returns bogus values for swap), I tried using com.sun.management.OperatingSystemMXBean instead. ...
(2) odpowiedzi
2018-01-17 19:01 Convert List stream into single Container »
Consider below WorkExperience class public class WorkExperience { private int year; private List<Skills> skill; public WorkExperi...
(4) odpowiedzi
2018-01-16 03:01 How to apply Filtering on groupBy in java streams »
How do you group first and then apply filtering using Java streams? Example: Consider this Employee class: I want to group by Department with a list...
(4) odpowiedzi
2018-01-14 19:01 Does Java 9 include Graal? »
I'm reading JEP 317. It says that Graal (a new experimental Java-based JIT compiler) will be part of JDK 10, but then it says that is already availabl...
(1) odpowiedzi
2018-01-12 14:01 reference to method is ambiguous when migrating from java8 to java9 »
I'm migrating a project from JAVA 8 to JAVA 9 and I'm having some trouble getting the code to work. All work in JAVA 8 but in 9 I'm having the followi...
(1) odpowiedzi
2018-01-12 08:01 Stream.peek() method in Java8 vs Java9 »
I am in the progress of learning through Java SE 8 Lambda Expressions and would like to ask about the following piece of Java code relating to the pee...
(2) odpowiedzi
2018-01-11 21:01 Method reference to private interface method »
Consider the following code: public class A { public static void main(String[] args) { Runnable test1 = ((I)(new I() {}))::test; // comp...
(4) odpowiedzi
2018-01-11 10:01 Replacements for deprecated JPMS modules with Java EE APIs »
Java 9 deprecated six modules that contain Java EE APIs and they are going to be removed soon: java.activation with javax.activation package java.co...
(2) odpowiedzi
2018-01-09 20:01 "java.lang.NoSuchFieldError: super" exception - bug in compiler? »
The following code written in Java-9 being run gives me a very weird and funny exception in runtime: Exception in thread "main" java.lang.NoSuchField...
(1) odpowiedzi
2018-01-09 16:01 com.sun.javafx.collections in Java 9 »
I need to recompile java applicattion, written on Java 8. App use com.sun.javafx.collections.ObservableListWrapper class, but when compiling for java ...
(1) odpowiedzi
2018-01-06 21:01 Java 9: Why does it keep lib/modules locked? (Windows) »
When I launch any third-party application, e.g. Notepad (but you could take anything else), from a Java 9 application and then exit the Java applicati...
(0) odpowiedzi
2017-12-31 11:12 Add jar to classpath at runtime under java 9 »
Until java9 for adding external jar to classpath in runtime by programmatically everybody used: URLClassLoader sysloader = (URLClassLoader) ClassLoad...
(1) odpowiedzi
2017-12-30 19:12 Why does spark-shell fail with "SymbolTable.exitingPhase...java.lang.NullPointerException"? »
Just installed Apache Spark 2.2.0-4 in my arch linux, as well as Scala 2.12.4 and Apache Hadoop 3.0, and I'm facing the following exception once I exe...
(2) odpowiedzi
2017-12-29 10:12 Remove all Optional empty/null values from arraylist in java »
I need to remove all empty/null values from List<Optional<String>>. Example: List<Optional<String>> list = new ArrayList<...
(2) odpowiedzi
2017-12-19 15:12 takeWhile() working differently with flatmap »
I am creating snippets with takeWhile to explore its possibilities. When used in conjunction with flatMap, the behaviour is not in line with the expec...
(4) odpowiedzi
2017-12-18 16:12 Why does \R behave differently in regular expressions between Java 8 and Java 9? »
The following code compiles in both Java 8 & 9, but behaves differently. class Simple { static String sample = "\nEn un lugar\r\nde la Mancha...
(2) odpowiedzi
2017-12-14 14:12 Targetting Java 6 with Java 9 JDK gives warnings »
I'm trying to build a project using JDK 9, as using the --release argument to javac means it can build for older versions without needing the correspo...
(1) odpowiedzi
2017-12-09 22:12 Creating BSS files from CSS in JavaFX 9 »
I'm in the progress of upgrading my project to Java 9 due to Eclipse upgrade breaking APT in Java < 9 when working with Dagger 2. I used to gener...
(0) odpowiedzi
2017-12-04 09:12 Why does Set.of() throw an IllegalArgumentException if the elements are duplicates? »
In Java 9 new static factory methods were introduced on the Set interface, called of(), which accept multiple elements, or even an array of elements. ...
(4) odpowiedzi
2017-12-03 00:12 How to have the java8 code that uses Unsafe working on jdk8 and jdk9? »
I am using sun.misc.Unsafe in my Java8 codebase. This does not work on Java9. I would like to have the fix for Java9, but with the same codebase that...
(1) odpowiedzi
2017-11-18 04:11 Is there any replacement for HTTP tunneling with RMI in Java 9? »
So I see that HTTP tunneling over RMI has been removed in Java 9. We sell commercial Java software, which runs in Tomcat. Our customers install this ...
(2) odpowiedzi
2017-11-17 17:11 Difference between RxJava API and the Java 9 Flow API »
It seems on every iteration of Java for the last few major releases, there are consistently new ways to manage concurrent tasks. In Java 9, we have t...
(4) odpowiedzi
2017-11-17 09:11 How will JDK9 modules help for 'package-scoped sub-packages'? »
I am wondering about JDK9 modules. Say you have the following 3 packages: com.company.product com.company.product.impl_a com.company.product.impl_b ...
(2) odpowiedzi
2017-11-15 07:11 What is the difference between no access specifier and public in java 9 module? »
From java 9, public access is limited to it's own module. Does it mean public acts like a package protected ( no access specifier )? Can someone clari...
(2) odpowiedzi
2017-11-13 10:11 Lambda causes compile error "incompatible types" in Java 9, compiles in Java 8 »
The following code compiles with Java 8 but not with Java 9: public class CompileErrJdk9 { @FunctionalInterface public interface Closure<R&gt...
(1) odpowiedzi
2017-11-10 18:11 How to install JRuby-9.1.13.0 with Java 9? »
I'm trying to install JRuby-9.1.13.0 with rbenv on MacOS. The issue is that for some reason still Java 7 (1.7) is required, which no longer officially...
(0) odpowiedzi
2017-11-10 12:11 How to inject module declaration into JAR? »
Suppose I have some library lib.jar for which I do not have the source code (or it is written in some non-Java language which is unaware of modules ye...
(2) odpowiedzi
2017-11-08 19:11 Java 9: How to find every new method added »
With the release of Java 9, numerous methods have been added to many classes, most (if not all) of which contain the following in their documentation:...
(2) odpowiedzi
2017-11-06 23:11 Are Class.cast and Class.isInstance methods in Java 9 actually intrinsic when invoking via class variable? »
I was looking through new intrinsic methods in Java 9 and found that now the method Class.cast is intrinsic too along with Class.isInstance. I did si...
(1) odpowiedzi
2017-11-03 20:11 Is there a way to add maven dependencies while using the maven-jlink-plugin? »
I'm using this Github project to get exposed to the new modular features in Java 9. I would like to add dependencies to the project and be able to bui...
(1) odpowiedzi
2017-10-24 15:10 How do I concisely write a || b where a and b are Optional values? »
I'm happy with an answer in any language, but I ultimately want an answer in Java. (Java 8+ is fine. Not limited to Java 8. I've tried to fix the tags...
(5) odpowiedzi
2017-10-21 10:10 Java 9 jigsaw - accessing resource files from external modules »
So far until non-modularized java, you would simply put a file in src/main/java/resources make sure it is in classpath and then load it with file = ...
(2) odpowiedzi