136 questions
0 votes
1 answer
211 views
Use of String.resolveConstantDesc in java 12
I was checking out all the new utility methods introduced in String class since java 8 and found this one method resolveConstantDesc which apparently takes a MethodHandles.Lookup as input. However, ...
1 vote
2 answers
12k views
build fail , "'com.sun.tools.javac.tree.JCTree qualid'" error occur
When I try to run the application it show the error. java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree ...
0 votes
2 answers
91 views
Filter list of custom object by specific object field
I have an object Batch (String id, Instant date, Long version) I have a list of Batch and I want to filter to keep one batch for each id where version is the highest i.e: batch1 = Batch(1, date, 5) ...
2 votes
0 answers
206 views
Solr 9.2 with JDK 17 : Java script engine not found
I am ugrading my Solr from 8.4 to 9.2 and Java from 11 to 17. Since JDK 12 nashorn java scripts are removed. Question: How are you using Solr ScriptUpdateProcessorFactory with JDK 12 or up? Error : ...
3 votes
1 answer
364 views
Java.net BodyPublishers not adding content length header in a POST multipart request (Java 17)
I'm having trouble using the java.net POST request for uploading files with multipart/form-data, when trying to send something to S3 using a pre-signed URL. The response complains about a missing ...
0 votes
0 answers
731 views
Graphics2D cannot be resolved to a type
I'm creating a game while following a tutorial and I came across an error. It shows Graphics2D cannot be resolved to a type. I'm new to java and I'm using Eclipse IDE (JavaSE-12). I imported the ...
0 votes
1 answer
151 views
Versionning with LocalDateTime causing OptimistickLockException
Currently upgrading our java/jsf/primefaces application, I'm facing folowing issue: I changed the versioning date from Date datatype to LocalDateTime, since that i'm having a OptimistickLockException ...
1 vote
0 answers
822 views
Error while installing java from tar.gz file
I am trying to install java version SE12 form respective tar.gz file. I followed this thread right here, How to set Oracle's Java as the default Java in Ubuntu? (@Barracuda's answer). When I am ...
-2 votes
1 answer
44 views
Page not found java project deployed using tomcat [closed]
I've got one java web based project. Build using JDK 1.8 and Using Intellij as IDE. Using tomcat to deploy the product Essentially in our product I was trying to test a few things with a class. Very ...
0 votes
2 answers
3k views
java.lang.ClassNotFoundException: java.lang.constant.Constable after upgrading libraries
I have an application running in Tomcat 9.0.45 with JDK 11 (OpenJDK 11.0.11). After upgrading some libraries (Spring 4.3.30 to 5.3.9) using maven, the application throws the following Exception: java....
1 vote
0 answers
1k views
Alternative to add-exports VM option
I'm trying to run and help develop a Java project (https://github.com/goxr3plus/XR3Player) with Java-12 and Maven. According to the README it requires multiple VM options to be set. This one is ...
0 votes
0 answers
391 views
Predeployment of PersistenceUnit fails because is 'uses a non-entity' after adding Maven to the Project
I'm working on a Java Web-App which was working perfectly fine and I wanted to try to deploy it on Heroku (which I've never done before). I read into it, and followed the steps on Atlassian for ...
0 votes
1 answer
108 views
Kotlin compile java 12 and kotlin inside Eclipse or command line
I tried to create a simple Kotlin command line app import java.RegistroJ class Main fun main(){ var registro:RegistroJ? = RegistroJ() registro?.setCognome("Baudo") registro?....
3 votes
0 answers
730 views
Syntax for -Djava.security.debug codebase
I'm trying to use the -Djava.security.debug command line option to get the permissions requested by a specific .jar file, ignoring all others. I can't seem to find the right syntax to get it to work ...
1 vote
1 answer
59 views
Java multiple generics in interface and classes
I'm working in a complex project with a lot of extensions and a lot generics. We use open jdk 12. The objects I'm working on are: public abstract class Node<C extends Node, P extends Property, A ...