Questions tagged [java-8]

Ask Question

Use this tag for questions specific to Java 8 which is version 8 (internal number 1.8) of the Java platform, released on 18 March 2014. In most cases, you should also specify the java tag.

22,386 questions 1

-1votes0answers13views

ScheduledExecutorService not working with parameters

I am trying to run a scheduled job using scheduledexecutorservice interface. It is working when a create a runnable task but it is jot working when I am trying to call a method which returns Runnable. ... user avatar Dheeraj

  • 85
2votes1answer39views

How to convert from long+TimeUnit to Duration?

I'm migrating some signatures from f(long dur, TimeUnit timeUnit) to f(Duration duration), and would like to implement the former with the latter. Being on Java 8, I can't find any API to easily ... user avatar Adam Kotwasinski

  • 3,840
0votes0answers13views

Combine lists of 2 different objects into list of single object using Java 8 Stream API

I have two lists as below: List ids = Arrays.asList(1,2,3); List reps = Arrays.asList("abc","pqr","xyz"); Now I want to create list of Prediction objects with values ... user avatar user3812288

  • 21
2votes1answer34views

Standalone Nashorn with Java 11 throws java.lang.StackOverflowError upon eval

I came across an issue with Nashorn, when evaluating a large expression, it works fine in Java 8 , but throws a java.lang.StackOverflowError in Java 11. Exception in thread "main" java.... user avatar Senthuran Ambalavanar

  • 156
-1votes0answers27views

Future of a byte array deserialization in Java 8 [closed]

I have an async network call to be made. I have seen two approaches of achieving the same. public Future<byte[]> getRepsonse(Request request){ Future<byte[]> repsonseBytesFuture = ... user avatar bharatharatna puli

  • 31
0votes0answers28views

When LockSupport.unpark() occur before LockSupport.park() , It would block in the park() method in the follow code, Why?

In javadoc , LockSupport.unpark() can occur before LockSupport.park() and guaranteed that next call to park is not to block. Makes available the permit for the given thread, if it was not already ... user avatar asiuf爱施德

  • 1
0votes1answer33views

How to extract the instance value in the string efficently

I have a string "/p4products/nemis2/filehandlerU/encdv2/work/10098325" which is coming as input from CMD. In this string the "encdv" is the environment name and "2" is ... user avatar lakshya saxena

  • 15
-1votes0answers23views

Load java agent in java 8

I am trying to load a javaagent in java 8, in higher versions (9+) there is the VirtualMachine class but in java 8 it does not exist, I have read that this class exists in the tools.jar and can be ... user avatar Dannn

  • 21
0votes0answers49views

why char[1024] shallow size is 2072

Here is a char array with length 1024. I dump Java program run in Java8 into a hprof file. I find the size of char[1024] is 2072. In my opinion, empty char array takes header(8 bytes) plus reference(4 ... user avatar CoXier

  • 2,296
-1votes0answers17views

configuring java 8, spring boot and webflux with oracle database

is it possible to use java 8 spring boot with webflux, database and oracle? I'm using spring-boot version 2.2.10, java 8 example of my pom <dependency> <groupId>org.springframework.... user avatar Felipe Carvalho

  • 24
0votes0answers16views

+50

hierynomus smbj write - share file access denied issue

Using smbj to rite file to shared folder and the below code is giving me access denied issue. But i have mounted the same shared folder under "Network Locations" and i can write file to the ... user avatar Pat

  • 477
0votes1answer17views

String to Streaming Output

I´m trying to convert String to StreamingOutput in Java8, but it trims a big part of the last part. The method that has an issue is: private StreamingOutput stringToStreamingOutput(String str) { ... user avatar Symeon Mattes

  • 989
0votes0answers15views

java.io.EOFException at org.apache.tomcat.util.net.NioEndpoint (tomcat 9 & openjdk 8)

I am upgrading the tomcat and openjdk version for a project. Target: Tomcat 9.0.63 and openjdk-8u322-b06. However, getting EOFException when using Tomcat 9.0.63 and openjdk-8u322-b06. I don't know how ... user avatar MLM

  • 1
-1votes4answers90views

Why get class cannot be cast to class java.lang.Comparable

I'm iterating all Student data using natural sorting method of java 8 sorted(). While iterating student data, get exception in IDE console class com.java8.Student cannot be cast to class java.lang.... user avatar Faeem azaz Bhanej

  • 2,020
-1votes1answer60views

Filter Java 8 list to contain elements based on thresholds defined in other list

I have a sample program below where subject passing marks thresholds are defined in Metadata. The studentMarks list should be filtered in a way so that the resulting list will contain all the subjects ... user avatar curious_brain

  • 217

153050per page

1 2 3 4 51493

You Might Also Like