Category "java"

Java Graphics, Graphics panel and Buttons Panel

I am trying to create a Frame that has a graphics panel on the top portion (through a Layout) and a buttons / labels panel underneath it in the same frame. So

How to remove all callbacks from a Handler?

I have a Handler from my sub-Activity that was called by the main Activity. This Handler is used by sub-classes to postDelay some Runnables, and I can't manage

SoapUI Build War file

I have xml project created by the SOAPUI. And I need to generate a war file using Java. I found the classes that provide this functionality, but when you creat

If statement executing all conditions

This may actually be a silly question but I am wondering if it is possible to have an if statement executing all conditions. I explain: if (methodA() &&

Difference between jar and war in Java

What is the difference between a .jar and a .war file? Is it only the file extension or is there something more?

Is there any way of having maven scp wagon work consistently on linux/mac/windows platform?

Given the very poor documentation about scp/ssh and maven I tried different approaches, basically falling in two main categories: using scpexe wagon and scp wag

Anyone experienced in real-time Java on embedded systems? [closed]

Has anyone out there implemented a real-time embedded Java system? I am very interested to see if this could work for a new product I'm devel

How is if/while condition evaluated when we use assignments instead of comparison?

I discovered this surprising thing while learning OCA/OCP for Java. Below is the first piece of code of which the if(test condition) part surprises me. public

How can I add a filter class in Spring Boot?

Is there any annotation for a Filter class (for web applications) in Spring Boot? Perhaps @Filter? I want to add a custom filter in my project. The Spring Boot

Apache Arrow in Scala: AbstractMethodError on loadBatch

I'm trying to load Arrow file into scala. But every time I call ethier arrowStreamReader.loadNextBatch() nor arrowFileReader.loadRecordBatch(arrowBlock), the JV

How to get line number of an instance variable from a java object during runtime

I want to find line number of an instance variable in Java file during run time. So far my understanding, it can be done through java reflection but don't know

Why does my ArrayList contain N copies of the last item added to the list?

I'm adding three different objects to an ArrayList, but the list contains three copies of the last object I added. For example: for (Foo f : list) { System

Drools flow persistence - Named query not found: ProcessInstancesWaitingForEvent

I have a problem with drools flow persistence (MySQL), I get the following exception: 2011-04-15 14:38:27,244 INFO [STDOUT] (http-0.0.0.0-8000-5) Hibernate: i

What Exception to throw when a web element is found in Selenium Automation [closed]

Currently, I am working on a "Selenium Wrapper Library", where a set of methods are created in order to perform automation on a particular Web

How to do the equivalent of pass by reference for primitives in Java

This Java code: public class XYZ { public static void main(){ int toyNumber = 5; XYZ temp = new XYZ(); temp.play(toyNumbe

extract word from string that have combination of letter and number in java?

this is my first question and sorry for my bad English I want to extract only word from String that have combination of letter and number and store it in array

How to set corner radius to imageview

I want to set corner radius to imageview and control the radius on seekbar. As the seekbar progresses the corner radius should increase and vice-versa. Currentl

How to set a button onclick event and link to Thymeleaf controller?

I am trying to write some code where, once the user clicks a button, it will do some set of code in my Thymeleaf controller class. I tried looking on other vari

Java equivalent of #ifdef that allows non-compilable code

Is it possible in Java to do a sort of #ifdef thing, like in C/C++? Example: class Test { public static final boolean ANDROID = false; public Test()

Force log rollover in tomcat log4j2 even if no traffic

Is there an option in tomcat log4j2 to force the logs to roll over after a defined interval even though there is no traffic at the time of rollover. Usual behav