Category "java"

Spring MongoDB query sorting

I'm fairly new on mongodb, and while I'm trying to make ordered mongodb query. But spring data mongodb's sort method is deprecated. So I used org.springframewor

How to modify PdfPCell so that you can remove a part of a border (e.g BOTTOM, TOP, LEFT)?

Here an example of my code: PdfPCell row6cell_1 = new PdfPCell(row6Par_1); row6cell_1.setBorder(Rectangle.NO_BORDER); row6cell_1.setBorder(Rectan

Error in replacing image from Aspose.slide java

Error :- WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.aspose.slides.ms.core.System.Drawing.ima

Java Questions Regarding declaring a list of Comparable objects

It is a pretty simple one. I want to declare a list of objects, but I want make sure all objects implemented the Comparable interface. What should I do? I try t

How to read geography values using hibernate?

In my spring boot application, I am trying to store spatial data using spring data with hibernate (jpa). Full source code of minimal reproducing example is avai

Java Thread lock on static method

As per my knowledge in Java class with Non static synchronize method : lock acquire on particular object Static synchronize method : lock acquire on class I a

How to remove auto generated code from Netbeans

Whenever I create new JPanelForm, NetBeans will create some auto generated code in initComponents() method. How can I remove this auto generated code from my JP

Hibernate: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]

I am attempting to deploy an application on a glassfish 4 server on my local machine. When I copy the .war file into the autodeploy directory, the glassfish log

How to delete a node from a circular linked list in Java?

Given a Circular linked list write a method in Java to delete a node.

JAVA_HOME no change for ionic run android

I am developing in Ionic 4. I am using mac Mojave, and according to java -version, I am using 1.8.0_201, and $ JAVA_HOME also points to 1.8.0_201. However, when

How to exclude all files under a directory in Gradle?

packagingOptions { exclude 'org/apache/commons/codec/language/bm/gen_approx_portuguese.txt' } For example, this one will exclude 1 file. But how to exclude a

Spring @Value annotation always evaluating as null?

So, I have a simple properties file with the following entries: my.value=123 another.value=hello world This properties file is being loaded using a PropertyP

java: how to both read and write to & from process through pipe (stdin/stdout)

(i'm new to java) I need to start a process and receive 2 or 3 handles: for STDIN, STDOUT, (and STDERR), so I can write input to the process and receive its out

Set background color in Java on a JPanel doesn't work

I am working on a "paint-like" application (a little drawing software) to familiarize with Java 2D components. Here is my problem: I have a JFrame whose Content

LocalDateTime - deserialization with LocalDateTime.parse

I have the field initiationDate which serialises by ToStringSerializer class to ISO-8601 format. @JsonSerialize(using = ToStringSerializer.class) private Local

AuthenticationSuccessEvent never fired

I writing app where user logs in using facebook. My security config/application class: @SpringBootApplication @EnableOAuth2Sso @ComponentScan(basePackages = {

How can I change Mac OS's default Java VM returned from /usr/libexec/java_home

(Wasn't sure if this should go on SU... migration is certainly an option, but more programmers read questions here, so here goes). I am running Mac OS X 10.8.4

i want to test java multithread ,but only one thread run

public class ThreadText { public static void main(String[] args) { windows w=new windows(); Thread t1=new Thread(w); Thread t2=n

How to read a properties files and use the values in project Gradle script?

I am working on a Gradle script where I need to read the local.properties file and use the values in the properties file in build.gradle. I am doing it in the b

onTouchListener ACTION_MOVE not working with more than 1 finger

I'm building an OpenGL ES app and I use an onTouchListener to detect touch events, as suggested by the android development website (https://developer.android.co