Category "java"

Calculate distance point to line

I'm using Mapbox for Android Java and need to calculate the distance between a drawn line defined by start and endpoint to the users current location. Any idea

Is it possible to set private static final field using Reflection in JDK 17 [duplicate]

I am trying to upgrade my application Java version from v1.8 to v17. There are some unit tests which are using Reflection to set value of priv

Error sending HTTP request. Message payload is of type: HashMap

I am failing at generating a POST message from within Anypoint Studio: What I am trying to accomplish is to send a POST to our Kykloud api endpoint with 3 key-

how to have close option in android keyboard

I don't wanna see the Enter option on my keyboard. showing close instead of Enter option. what should I do? The screenshot of my layout: my xml code :

Parallel tests in Android with cucumber, appium and testNG in java

I have 5 real devices in which I want to execute 20 tests, for example: 4 tests in each device in parallel, that is, in device 1 test 1 is executed, when the te

Oracle MAF 2.3.0 Jdeveloper 12.2.1 can't deploy applications

i'm developing an android app with MAF 2.3.0 in Jdeveloper 12.2.1 on a Ubuntu x64 OS and i have android SDK emulator running but everytime i want to deploy my a

How do I change the color of the timepicker in my Android app?

As you can see from the image below, I'm using the time picker in my app. I need to change the color but don't know how... Thanks for the help.

Swipe to refresh data using SwipeRefreshLayout in fragment?

I want my layout to be refreshed when the app starts and the data should show in and when the user swipes the data should be updated and show new data if new da

ListFragment Not displaying data from List

After I try to open the navigation drawer and go to a different tab and then go back to it. It is not showing data in a list once again. Main Activity package c

How to read/write a file in Java

I would like to replace some items in a file, based on some regular expressions. In order to do that: I read the file line per line For every line, I check for

Generating and accessing WSDL on Tomcat with Maven

I have a JAX-WS server that I package with Maven and deploy on Tomcat. The pom.xml generates the WSDL file automatically with the trick from Use Maven to trigge

I added a maven project as dependency in another maven project

I added a maven project A as dependency in another maven project B and then access the jar created by B in another project through reflection, but its throwing

Calling default method in interface when having conflict with private method

Consider below class hierarchy. class ClassA { private void hello() { System.out.println("Hello from A"); } } interface Myinterface { defa

Spring Boot Custom Authentication Provider with Java Configuration not working

I am trying to setup a REST based web application, where the frontend is using Reactjs and the backend is using Spring Boot. I am also trying to setup a custom

how to get clicked value and pass it to another jsp page (integer)

I am working in a project in which I have a Display.jsp page which fetches all the records from mysql database and shows in a table on the page. While I want to

Android Tip,Tax,Total Calculator

Hello I am new too Java and learning how to built android apps. I have this calculator that I have been working on I need help in figuring out how to set value

Android Studio mailto Intent doesn't show subject and mail body

I'm trying to send an e-mail from my Android App. With the click on a button, gmail should open and show a new email with my previously defined recipient, subje

Why is my progress bar not turning visible in Android Studio

I am attempting to build an app that displays a "ladder" between two different words of the same length. While my program is finding the ladder between these tw

Unexpected exception caught: com.ptc.pfc.Implementation.pfcExceptions$XToolkitGeneralError while running AsyncInstallTest

Can any one help to write simple program using jlink java to open creo tool on executing of java program. what i have done so far is, installed creo-5.0.0.0 and

Json4s not serializing Java classes

I have some scala code that needs to be able to serialize/deserialize some Java classes using Json4s. I am using "org.json4s" %% "json4s-ext" % "4.0.5" and "org