Extracting a word plus 20 more from a section (python)

Jep still playing around with Python. I decided to try out Gensim, a tool to find out topics for a choosen word & context. So I wondered how to find a word in a section of text and extract 20...

How to disable scaling the UI on Windows, for Java 9 applications?

There was no proper HiDPI support in Java 8. In Java 9, JavaFx applications correctly scale to the monitor they are in. For example, if my monitor is set to scale at 150%, the Java application is...

SimpleDateFormat with German Locale - Java 8 vs Java 10+

I have code and a test-case in a legacy application, which can be summarized as follows: @Test public void testParseDate() throws ParseException { String toParse = "Mo Aug 18 11:25:26 MESZ...

What is the difference (or relation) between JLS, JSR and JEP?

JLS - Java Language Specification JSR - Java Specification Requests.The formal documents that describe proposed specifications and technologies for adding to the Java platform. JEP - JDK...

Is there a replacement library for CORBA in JDK 11

JDK-11 will remove a lot of older parts of the JDK (JEP-320). For some of them (e.g. JAXB) functionality will be provided as regular library. You simply add another dependency and everything works...

Error:java: error: invalid source release: 13 using JDK12 with IntelliJ

I am trying to build a project with JDK-12 ea. While trying to execute a sample class: public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int value =...

How to use Java 12's Microbenchmark Suite?

According to JEP 230: Microbenchmark Suite, there exists a microbenchmark suite built-in to Java 12. The JEP explains that it's basically JMH, but without needing to explicitly depend on it using...

Trying to use 1 action listener for multiple buttons

So I am trying to code a jeopardy game, but the catch is that I am only trying to assign my buttons to 1 action listener so that all buttons function on their own yet work from 1 action...

Deploying multiple release .jar on Oracle WebLogic Server

We are trying to deploy a web service (a .war file) onto an Oracle WebLogic 12.2.1.0.0 Server. The .war contains some third party .jars, for example log4j-api-2.12.0.jar, that are multiple release...

JMeter Warning: Nashorn engine is planned to be removed from a future JDK release

When I run JMeter 5.1.1 recently downloaded, I see many times in terminal window: Warning: Nashorn engine is planned to be removed from a future JDK release I've used web search and found JEP...

Java convert Html to Image

I generated a Html with information of my client, so that he can attach them to your website or email. But some clients asked me to generate an image and not the html. I used the code below to...

Java jpackage native packaging, WiX tools not found error

I am using the beta jpackage tool (JEP 343) that comes with the JDK14 early access build. I have run the following .bat script in windows "%JAVA_HOME%/bin/jpackage" ^ --name NAME ^ --dest store/...

Java 14 records json serialization

Currently experimenting with the Records implements from java 14, everything looks nice but since the accessors are slightly different and jackson is not being able to deserialize and giving the...

Java Records and Lombok annotation - IntelliJ

Just trying a hands-on the java.lang.Record. I have gone through the documentation and the JEP-359 for some understanding. So upon reading about the implicit declaration of the constructor I...

How to enable helpful NullPointerExceptions in gradle test

This problem has been fixed in Gradle 6.6 Original post I want to put the flag -XX:+ShowCodeDetailsInExceptionMessages to enable helpful NPEs (https://openjdk.java.net/jeps/358) on the tests I...

Are Java records intended to eventually become value types?

The record preview feature (JEP 384) introduced in JDK 14 are a great innovation. They make it much easier to create simple immutable classes that are a pure collection of values without the loss...

What is the point of extending a sealed class with a non-sealed class?

I don't really understand why there is a non-sealed keyword in JEP 360/Java 15. For me, an extension of a sealed class should only be final or a sealed class itself. Providing the "non-sealed"...

Getting docker error while using shell gitlab-runner ERRO[0000]

Hello I got this error at the installation, when I use the command "gitlab-runner run" or "gitlab-runner start": ERRO[0000] Docker executor: prebuilt image helpers will be loaded from...

Sealed classes don't compile, Eclipse compiler bug?

I am having those two classes in Eclipse 2020-09 and 2020-12: Class A package test; public sealed class A permits B { } Class B package test; import java.io.Serializable; public final class B...

JBAS015852: Could not index class module-info.class - WARNING at startup

We use some jars are libraries in our app. The app runs inside WildFly. I am getting now these warnings when starting up WildFly after upgrading certain jars/libraries. WildFly version is...

Incubator Module vs. Preview Feature in Java

JEP 11: Incubator Modules: Summary Incubator modules are a means of putting non-final APIs and non-final tools in the hands of developers, while the APIs/tools progress towards either...

Why do Java Records have accessor methods instead of public final fields?

JEP-395 says a record class acquires many standard members automatically: For each component in the header, two members: a public accessor method with the same name and return type as the...

Gradle Ktlint plugin fails on Java 16

After upgrading to Java 16 I am not able to make ktlint gradle plugin to work. It's throwing Execution failed for task ':runKtlintCheckOverMainSourceSet'. A failure occurred while executing...

Biblatex doesn't compile. Probably .bib file not recognised

I've spent many hours trying to get my bibliography working - unsuccessfully. I suspect that, somehow, my .bib file doesn't get recognised. Help would be greatly...

How much overhead does a Java Foreign Linker API call have?

I was curious how much overhead there was in calling functions via JEP 389: Foreign Linker API. I have searched around but I can't seem to find that kind of info. I was taking a look to see if it...

How to read the classes from another JRT?

From Java 11, how can I read the content of another runtime image? In order to list the content of a Java runtime image, JEP 220 suggests the following solution: A built-in NIO FileSystem...

Sealed classes for classes in different packages

If I declare following sealed hierarchy package a; import b.B; public sealed interface A permits B { } package b; import a.A; public record B() implements A { } without using modules (no...

In Java 17 how do I avoid resorting to --add-opens?

As of Java 17 --illegal-access is effectively obsolete https://openjdk.java.net/jeps/403 Any use of this option, whether with permit, warn, debug, or deny, will have no effect other than to issue...

How to call a C function from Java 17 using JEP 412: Foreign Function & Memory API

Does anybody have a simple example on how to call a C function from Java 17 that includes creating a C library and how to setup a MethodHandle? The JEP description at...