Category "java"

Tabula read pdf - CalledProcessError

I am using tabula to read tables from a pdf. The documents I'm extracting data from are really large, so I'm using a for-loop to run through the different pages

Android - change send icon's color on ImageButton

How to change the default color of send icon on this ImageButton? <ImageButton android:id="@+id/ImageButton1" android:layout_width="0dp" android:

Need to show "Insufficient Funds" for negative amounts

I need to throw an exception for "insufficient Funds" when a user withdrawals more than the amount in initialAccountBalance (which equals 500.00). However, I a

org.springframework.ws.soap.client.SoapFaultClientException: 400200

I was trying to develop a webservice client using spring webservicetemplate. I am newbee to both spring and webservices. I am badly struck with this error.

Gradle: Building a modularized library that is compatible with Java 8

So Java 9 is there, soon to be followed by Java 10. Time we should make our libraries ready for use in Java 9 projects. I did it in the following way: provide

Android webview with timer

I am implementing a timer on webview activity with 1 second delay like clock. On each event webview is loaded with generated HTML having canvas and 2 tables. Wi

Execute the remaining code after handling exception in java? [closed]

I may be silly. But I got interviewed and I was asked question regarding how you will run the remaining code after you will get the exception.

Execute the remaining code after handling exception in java? [closed]

I may be silly. But I got interviewed and I was asked question regarding how you will run the remaining code after you will get the exception.

org.hibernate.QueryException: Not all named parameters have been set:[]

I'm getting extremely strange behavior out of JPA 2.0 I'm trying to build a query that looks likes, where employeId and empDepartment are long values passing

In Activity.onCreate(), why does Intent.getExtras() sometimes return null?

This was probably a false alarm, see my own answer. Original question below: An activity has a button that takes the user to another activity. To launch the ne

Execute the remaining code after handling exception in java? [closed]

I may be silly. But I got interviewed and I was asked question regarding how you will run the remaining code after you will get the exception.

Android Studio: W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED

I am trying to make a movie list, but it only shows a white screen with the app name. Apparently, I have a very similar program to this and it runs perfectly fi

how to mock global variable in Mockito

I have a global variable global. My method has a line: global.getListOfObjects() I am trying to write a unit test and keep getting a NPE on the above line.

The input line is too long when starting kafka

I'm trying to run Kafka message queue on Windows. I'm usin this tutorial - https://dzone.com/articles/running-apache-kafka-on-windows-os When i try to run it

How to change element in array?

Array is 2 dimensional 10x10 gameBoard Code I made for array: int gameBoardLength = gameBoard.length; System.out.print(" "); //two spaces to align t

Ignore maven execution block which uses toolchain if ~/.m2/toolchains.xml is not present

I'm working on an open-source library which must work correctly on jre7. Since java 9 has been released, we decided to provide our modules with module-info.java

Gradle - "Changes are not tracked, unable determine incremental changes."

When running my LibGDX desktop project I sometimes get this error: Changes are not tracked, unable determine incremental changes. I've tried using Java 8 and 17

A way to consider the backslash as a normal character

Is there someone who knows how to consider the backslash as a normal character (not an escape character) in a string in Java? Any help will be appreciated!

How to set default download directory in selenium Chrome Capabilities?

Please find the below code with the chrome capabilities. In fact the browser is not downloading the file to the specified path. private static DesiredCapabili

AWS rds - How to read from a read replica inside of a Java application?

I am new to aws. I have a mysql rds instance and I just created 2 read replicas. My application is written in Java, and what I have done up until now is using