Category "java"

how to check if ElasticSearch's Restore is finished?

Can I monitor Elasticsearch's Restore process? I am looking for a GET request in Elasticsearch's API that checks if restore has finished. I'm restoring indice

How to use Kotlin with a Bukkit/Spigot plugin and Gradle

I am trying to use Kotlin for a Spigot plugin (for version 1.8.8), as I find Kotlin a lot more efficient to use. But, whenever I try and run the plugin, I get t

What should be @JsonFormat(pattern="") in Spring-boot for given example

Using Spring-boot RESTful service,in that receiving JSON file which contain DateTime in following format "2017-08-16T16:08:25.000Z" and JsonFormat tries are e.g

Jasypt not decrypting properties during junit testing, but works fine when spring boot app runs

I have a Spring Boot application with a few properties encrypted with Jasypt, and I provide the secret key with the following VM option: -Djasypt.encryptor.pass

java.io.IOException: Invalid keystore format / Unrecognized keystore format. Please load it with a specified type, when using an old android keystore

I tried to sign an old Android application with Android Studio 4.0.1 (which I successfully signed say, 1 year ago) and it seems the keystore cannot be open anym

Exclude transitive dependency of Gradle plugin

Excluding a transitive dependency in Gradle is pretty straightforward: compile('com.example.m:m:1.0') { exclude group: 'org.unwanted', module: 'x' } H

Why do we need to typecast the WebDriver instance to JavascriptExecutor before calling the executeScript method?

JavascriptExecutor is an interface which provides some default code for executeScript method. RemoteWebDriver implements this interface and overrides the method

Getting memory leaks with okhttp

When I make a get request to an API, over and over again I see that every request the memory goes up and up until 1gb of ram usage. closing the response and au

Java HttpsURLConnectionImpl.getOutputStream() error : java.net.SocketException: recv() failed, errno = 104 Connection reset by peer

We have a Java 8 solution (as a Java application on Oracle Database) that communicates with a external webservice using HttpsURLConnection. The solution had bee

Unable to parse template "Class"

I am trying to create class in android but i got this error Unable to parse template "Class" Error message: This template did not produce a Java class or

idea: too many module declarations found

I want to create hello world java 9 application and start it in intellij idea. Now I have following structure: content of inner module-info.java: module my.m

How do I use the same variable between buttons?

I've created a rock paper scissors game in java, but I don't know how I could use the same variable to work between 3 different buttons (rock, paper scissors).

Difference between method chaining and fluent interface

I wanted to know the exact difference between method chaining and fluent interface. As I understand it, method chaining is just running the methods of previous

Remove/revoke GitHub OAuth 'access_token'

I am using this GitHub's API to generate an access token for the user (mobile app), using this tutorial: https://developer.github.com/apps/building-oauth-apps/

context.getInitParameter("") and config.getInitParameter("") always returning null

I am a beginner in servlets and JSP and I've tried my best to get the values yet I am getting null, any help is welcomed: This is basic code on using ServletCon

Java string matching with wildcards

I have a pattern string with a wild card say X (E.g.: abc*). Also I have a set of strings which I have to match against the given pattern. E.g.: abf - false

How to assign an icon to a file?

I am making a program that stores information in a file with a custom extension. I was wondering If it is possible to assign it an icon within the program so th

Parsing encrypted PKCS#8 encoded pem file programatically

I am having trouble figuring out how to properly read a private key of a pem file. I have gone through different topics on stackoverflow, but I couldn't find th

The class 'javax.persistence.Convert' is required to be in the selected libraries

When selecting a user library as the JPA implementation in Eclipse Dali's project settings, the following error message is displayed: The class 'javax.persi

How to find file path to a bash file when the folder is renamed or moved to a new drive?

I've made an executable jar file for a terminal game that can be opened by typing java -jar name.jar in the Terminal. Then I made a .sh file inside the same fol