Category "java"

JCenter deprecation; impact on Gradle and Android

Should I be worried about JCenter being deprecated? Why should I migrate my libraries from JCenter to other Maven repositories? Can I continue to use jcenter()

What's a regex that matches all numbers except 1, 2 and 25?

There's an input of strings that are composed of only digits, i.e., integer numbers. How can I write a regular expression that will accept all the numbers excep

Play recorded audio with chronometer counter

I'm creating a recorder app with chronometer counter, the chronometer is working fine with start record, stop record and stop play. My problem is only with sta

Eclipse (JBoss Developer Studio) not automatically building JPA metamodel classes

I have a Maven project set up that has a parent and two child modules: parent business support All of my JPA entities are in the support module. I've

How to communicate between a dialog and parent Controller in javaFX

I have a MainController and when I press a certain button, a custom dialog (loaded from a custom FXML file) pops up from that MainController class. Now, in that

Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Migration Checksum mismatch for migration 2

I tried to find the solution for the below problem, but none of them worked for me. I am developing Angular + Spring Boot application using MySQL + flyway. Plea

How do I configure beans for a static wsdl, which is importing a root xsd of a hierarchical structure?

I am implementing soap web services in a Spring environment. The xsd and wsdl definitions come from an external company, and I've implemented the endpoints alre

Java How to Normalise a URL and Remove Fragment

How to normalise a URL in Java to remove the fragment. I.e. from https://www.website.com#something to https://www.website.com This is possible with the URL.Nor

How to store List of Elements which are present in multiple Page?

There is a button called "Responses" total number of button is 100 which are store in 2 different webpages, from 1st page to 2nd page navigation button called "

How to reduce my java/gradle docker image size?

I have a Docker file like the following: FROM openjdk:8 ADD . /usr/share/app-name-tmp WORKDIR /usr/share/app-name-tmp RUN ./gradlew build \ mv ./build/l

reversing an integer in java without a loop

This is an homework problem Is there a way tor reverse a number in Java without using any loops? The only solution I can think of is reversing it using String

How to Find Prime Number in Java?

Hello I have java project that user need to enter int = number and find prime number. Problem: When I Enter 10 Does't Print Any Thing. public class Prime_Numbe

safardriver closes automatically before driver.close() is called in @Aftermethod

I'm running below test scripts in safari browser version 5.1.7 on windows 7. After running @test method I'm calling driver.quit() in @aftermethod. But safari b

Logback cannot find a custom configuration file (FileNotFoundException)

I can't force logback to use my custom configuration file because it doesn't see it. Here is my project structure: src --main ----java ----resources ------log

Java: Print a unique character in a string

I'm writing a program that will print the unique character in a string (entered through a scanner). I've created a method that tries to accomplish this but I ke

Inject application properties without Spring

I would like a simple, preferably annotation-based way to inject external properties into a java program, without using the spring framework (org.springframewor

How i can receive variable from another thread in Jmeter

in the first thread, I received JSON (format - {"id":6054,"name":"Jmeter created chat","description":"jmeter created test"}) I want to use it in the second thre

Creating Pagination in Spring Data JPA

I am trying to implement pagination feature in Spring Data JPA. I am referring this Blog My Controller contains following code : @RequestMapping(value="/orga

Read a set of lines from a file using BufferedReader

I have one large CSV file of around 1.6 GB and I am trying to read that file and create JSON array of these lines and send it to other consumables processes. I

Java Spring-boot caused by: org.springframework.data.mapping.PropertyReferenceException: No property id found for type

I can't understand where is the problem Repository class: @Repository public interface PhotoRepository extends JpaRepository<Photo, UUID> { Page<Phot