Category "java"

How to format datetime like java?

I have the following java code: SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss.SXXX"); String timestamp = simpleDateFormat.for

How to redirect JUnit testing to the console in Eclipse?

I am a blind screen reader user and have a problem with JUnit in Eclipse. The results of tests passing or failing is represented as far as I understand visuall

Open a file's properties window using Java

This is a question only regarding Java in Windows. I need a method that will call this window: So essentially the method should be something like: public v

Getting AlreadyExistsException when creating table, even table is not found in aws keyspace

I am trying to create a table through following query on aws keyspace. it is throw an exception that "com.datastax.oss.driver.api.core.servererrors.AlreadyExist

Eclipse Google Cloud SQL connection

I am writing a Java MVC web app in Eclipse using Google App Engine. I would like to know why once I have deployed the app to Google Cloud the Google Cloud MySQ

Why I am getting java.lang.IllegalStateException when the validate servlet is called?

I have a login web application. Whenever I login, the request must be validated by validate Servlet and it must be forwarded to admin.jsp Everything is fine exc

VS Code terminal unable to privide UTF-8 input

I'm hopeful that this question is a duplicate, but I have searched a lot at this point, and I've not come across anything helpful, so I am dubious. The followin

How to declare string array[] of unknown size (JAVA)

I want my String[] array; to be static but I still don't know it's size. Is there any way to declare string array of unknown size? As much as possible I don't

Auth2 implementation for JAVA EWS existing project

I am new to auth2 implementation for Microsoft Exchange service and I want to implement the same in existing process Login Process. Previously we are using User

Springfox 3.0.0 is not working with Spring Boot 2.6.0 [duplicate]

Springfox 3.0.0 is not working with Spring Boot 2.6.0, after upgrading I am getting the following error org.springframework.context.Applicatio

Spring Boot @EnableScheduling conditionally

Is there a way to make @EnableScheduling conditional based on an application property? also is it possible to disable controllers based on properties too? What

Cucumber: Can't convert DataTable to List<java.lang.String>. There was a table cell converter but the table was too wide to use it

Feature file: Scenario: Login to application Given I open my application And I login with following credentials | admin | pass1234 | StepDefs: @When("^I lo

Android gives error "Cannot fit requested classes in a single dex file"

I don't know why but it's impossible to launch my app on my mobile this morning. I get this error message: Cannot fit requested classes in a single dex file. T

Cannot resolve method registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter) in Fragment class

//here my code //used this IntentFilter IntentFilter filter = new IntentFilter(); filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); filter.addAction(Bl

Difference between String trim() and strip() methods in Java 11

Among other changes, JDK 11 introduces 6 new methods for java.lang.String class: repeat(int) - Repeats the String as many times as provided by the int paramete

Java application for sorting and selecting

I need to develop a simple application for sorting and selecting data according to predefined rules. The application must be able to work with JSON lists of obj

App isn't building after update Firebase Performance SDK

After update classpath 'com.android.tools.build:gradle:3.5.3' to classpath 'com.android.tools.build:gradle:3.6.1' Getting compile errors below.... Caused by: o

java.lang.UnsatisfiedLinkError: Could not load library gstreamer-0.10

I'm getting this issue while compiling the code below. I installed gstreamer for Windows and added development jar file to my IDE but I couldn't solve this prob

How to setup Javacc in windows 10 [closed]

How do I install javacc in Windows 10? I visited https://javacc.github.io/javacc/, but there's no clear instruction to set it up on Windows.

Apache camel route is not identified

I have a spring boot application to which I am adding a camel route. The class where the route is defined extends FatJarRouter and is annotated with @Component.