Skip to content

Tag: java-8

OpenJdK 8 – Can’t compile package javafx.util does not exist

I build my java project by Maven. When I try to compile my java project by OpenJdk 1.8.0_322: I get error: P.S. If I use jdk1.8.0_202 from Oracle the project success compile! P.P.S. The project must be compile by java 8. It’s client requirements. Answer tl;dr Either: Develop/deploy on a JDK that includes the OpenJFX libraries. Add the OpenJFX libraries

How to get a generic type which is defined on method in Java?

Question 1: Suggest I have a example like this: then can I get type String in methodA without actually passing String to it? Question 2: If the previous example is transformed to this: I mean what was passed into methodA is no more a simple object but a lambda expression, also, can I get type String in methodA? Answer No,

Downgrade from Java OpenJDK 64-Bit Server VM 1.8.0_292

Good morning, I have an application that works only with Java OpenJDK 64-Bit Server VM 1.8.0_292, however we are in the Java OpenJDK 64-Bit Server VM 1.8.0_312 version. How can I install it? Answer Go here: download package extract package try calling it direclty (/new/path/jdk8/bin/java -version). This should now differ from calling the default java (java -version) instead of

Using Stream API to count stats

I have following model representing a Snack bar SnackBarStat – This has a start date for a booking, number of customers in booking and number of Days(customer can set a start date and say for how many days they want to have table) Now given a list of such stats I am trying to find for each date how many