Category "java"

Copying Character array into char array

Hi I want to fast copy array of Characters to array of chars I can write a method that copies Character array into char array, by converting every Charater in a

How to fix 404 error, The origin server did not find a current representation for the target resource or is not willing to disclose that one exists

When I am trying to execute @RequestMapping("/showForm") I am facing an error. I think my code seems fine, I am simply returning new String with the name of my

Using docx4j to convert .docx to .pdf

I'm trying to convert .docx files to .pdf files. Now I have the following code: class DocxToPdf { fun convert(inputFileLocation: FileInputStream, outputFile

How to read data from nested zip files in Java without using temporary files?

I am trying to to extract files out of a nested zip archive and process them in memory. What this question is not about: How to read a zip file in Java: NO, t

Unable to load class exception during Kryo deserialization

I am using Kryo for serialization / deserialization and not registering classes beforehand (I am working on that). That said, upon deserialization, I am gettin

Elasticsearch find all indexes using the Java client

Is there a way to use the Java client to get a list of indexes that are in Elasticsearch? I have been able to find examples of doing this using Marvel/Sense, bu

How to set Chrome Options when using WebDriverManager?

I'm using Web driver manager to setup chrome driver. When setting up the driver I want to add some chrome options? How can I do it when using web driver manager

YUV buffer size not matching image size

I am currently using Android Camera2 API and decoding the frames through an ImageReader in a YUV_420_888 format. I managed to get everything working, all looks

Adding Material effects to java swing

I am trying to make a Java Swing application using NetBeans 8, and I was wondering if there is any possible way I could apply materialize effects to my Java Swi

Trying to connect to Firebase but crashes when adding button

I'm trying to set an app to just enter something on the textEdit and change it in real time in the Firebase database. The app works just fine if I just do myRef

Maven: How to fix foreign imports? (in Azure Function)

when I try to start my Azure function locally in Visual Studio Code I get a Maven error as following: [ERROR] Failed to execute goal com.microsoft.azure:azure-f

Get Linux file descriptor of FileChannel

Is there a way to get the Linux file descriptor for an opened FileChannel? I need it to call mount.fuse -o fd=... (for implementing FUSE). As a hacky workaround

Mockito argument matcher and hibernate lazyinitialization

I've created the following captor: public class CompanyOwnerMatcher extends ArgumentMatcher<CompanyOwner> { private String uuid; CompanyOwnerMa

Selenium handling html elements inside object tag

I'm struggling with validating html elements inside html object tag. Following is my test html (test1.html). <html> <body> <h1>this is t

No implementation was created for Mapper due to having a problem in the erroneous element

I'm trying to use Mapstruct to map my classes in a spring boot project. My dependencies : <?xml version="1.0" encoding="UTF-8"?> <project xmlns="ht

How to use lombok with Kapt3

When I try to run Java/Kotlin android application with Lombok while using Kapt3: apply plugin: 'kotlin-kapt' javac compilation fails with numerous error: ca

How can we programmatically get call hierarchy for methods in IntelliJ

Getting call hierarchy is easy in IntelliJ. Simply use the built in tool. But is there a way to do it using code? Eclipse internal JDT has two classes called Ca

I have migrated code from struts-2.1 to struts-2.5,its working fine for all locales. Except for en_UK locale

I have migrated code from struts-2.1 to struts-2.5,its working fine for all locales. Except for en_UK locale where in WW_TRANS_I18N_LOCALE value fetched is en

How to remove text between <script></script> tags

I want to remove the content between <script></script>tags. I'm manually checking for the pattern and iterating using while loop. But, I'm getting S

Sometime video buffering very slowly in exoplayer?

I don't know why, but sometimes Exoplayer buffers my video very slowly. My server is responding properly and the internet is also fast but sometimes Exoplayer b