Category "java"

How to split catalina.out for tomcat?

I have log4j2.xml properties: <?xml version="1.0" encoding="UTF-8"?> <Configuration> <Appenders> <Console name="Console" target

How to add image next to the title text of an Expandable composite?

I am working on modifying EGit for an use case. The current state looks like the following: I now want to add an image next to the title text of the unstaged s

Mocking a object using powerMockito.whenNew() and using doNoting(object) but locally created object is calling actual method

public class A { public String[] processMessage(Message msg) { public boolean A(msg) { Utils utils = new Utils(); utils.meth

Accessing Azure Blob via a Registered App Using Tokens

I'm new to Azure and I'm struggling to get a simple demo working. I'm trying to write a daemon client that accesses a blob. The access must be via a registered

Spring scheduling task - run only once

Is it possible to schedule Spring service method only once at exactly specified time? For example, current time is 2pm but when I hit the action button I want t

Is there any way of connecting minecraft javaPlugin to discord javaScript bot?

So basiclly, I was making a minecraft plugin, and I want to add function that alows you to log in into serwer in minecraft only if you are on discord. But i don

Join multiple threads with timeout

I need to join multiple threads with a timeout. Something like Thread.join(long millis) but for multiple threads. I found some posts about joining multiple thr

Spring. Registering Aspect with @Bean

I need some help with creating Aspect bean. I have module A, B... and module starter-x. I have a couple of Aspects declared in module starter-x, and configura

Why does Jackson 2 not recognize the first capital letter if the leading camel case word is only a single letter long?

I'm using Spring 4 MVC with Jackson 2 for my service. For one of the operations I have a request object that has an attribute where the leading camel case word

Where is the Balance Between Dependency Injection and Abstraction?

Many Architects and Engineers recommend Dependency Injection and other Inversion of Control patterns as a way to improve the testability of your code. There's n

Showing a loader while waiting for server-side code with AJAX [duplicate]

My problem was described in Showing a loader while waiting for server-side code (without a blank page). To summarize briefly, I want to show t

function loop for more than one times java

so basically i tried to call method that return array from other class java, it works perfectly except it double the size or length of the array 2 times from or

Showing a loader while waiting for server-side code (without a blank page)

I've tried to make a loader for every page but failed. I want to show the loader before completing server-side jobs: [Loader] -> [Target page]. However, HTML

Which Java version is the fastest on and is supported by Android?

I heard that Java is becoming faster on newer versions of Android that it's almost as fast as C++, and the performance depends on the type of code/operations. I

Programmatically check OpenGL support

My swing application is trying to use OpenGL to get better performance. But on some machines the UI doesnt load at all. How could i determine programmatically i

How to get the whole row of a JTable to save it into another table?

I am trying to validate that when the column step is equal to 2 the row is copied to another JTable. But the jtable_step2 I have not initialized correctly, that

How to customize a vector in Android Studio?

I am working with an Android app (using API 21) in which I can change the color of a vector manually depends on previous Activity, but I have a problem, I can n

What is the fastest way to iterate on a stream in Java 8?

If I have a collection and I want to iterate over a filtered stream then I could do either of the following (and many more obtuse options): for(item in collect

Google Cloud: Pubsub subscription filter expression options

I am trying to put filter in the GCP pubsub subscription. My requirement is to add number of codes in the filter. I am using terraform for that. Here is somethi

Field in com.XXX required a bean of type that could not be found

I'm working on Spring over Hibernate project an i'm only in the beginning. I'm tryng to hav a SpringBootApplication which writes to MsSql some LogEntries object