Debugging in Maven?

Java
Is it possible to launch a debugger such as jdb from Maven? I have a pom.xml file that compiles the project successfully. However, the program hangs s...
2 years ago

How to hide a View programmatically?

Java
In my application, I have 2 LinearLayout's right above each other. Via a menu option, I want to be able to make the bottom one disappear, and have the...
2 years ago

Counting duplicate strings in array with equals()

Java
Brand new to Java and I cannot seem to figure this out: All I'm trying to do is print a duplicate string and the number of times it shows up in an a...
2 years ago

How can I check with joda-time is it first, second, ... , or last week of a month by given date?

Java
For example: 5 February 2016 - first week, 12 February 2016- second week, 28 February 2016- last week ...
2 years ago

How to get a list of IP connected in same network (subnet) using Java

Java
How do I get list of IP addresses for devices connected to my same subnet using Java?
2 years ago

Dragging Image using MouseDrag method

Java
I'm trying to code where an image can be dragged using the mouseDragged method, but I can't seem to successfully do it with my current code. My aim is...
2 years ago

Find if a number is a power of two without math function or log function

Java
I want to find if a user entered number is a power of two or not. My code doesn't work. public class power_of_two { public static void main...
2 years ago

Aceess multi-dimentional Arraay

Java
I have an array of arrays, like this: public static String[][] dhaka_header = { {"a", "a", "a", "a", "a", "a", "a"}, {"b", "b", "b",...
2 years ago

How to use String replace correctly in this case?

Java
I have got a SMS Template as shown below User: XXXXXXXXXXXXXXXXXX, Ph: XXXXXXXXXX, Loc: XXXXXXXXXXXXXXXXXXXX, Area: XXXXXXXXXXXXXXXXXXXX, added you ...
2 years ago

fetch user name and password from URI

Java
Is that possible to fetch user name and password from URI using standard Java API? URI uri = new URI("http://user:[email protected]/some/path"); uri.getUserP...
2 years ago

Can't compile open-source java game

Java
I downloaded this open source game from https://github.com/SergeDavid/Advanced-Wars-Clone and want to compile it to check it out. However, I am still ...
2 years ago

Can NetBeans 8.0 automaticaly change autogenerated Swing code?

Java
I have two RadioButtons and this is the code that keeps getting set for them: jRadioButton6.addMouseListener(new java.awt.event.MouseAdapter() { ...
2 years ago

Java / Generics / ClassCastException

Java
I have a LinkedList<T> which contains Object toArray() method: public Object[] toArray() { Object[] array = new Object[size]; int c=0...
2 years ago

How to set Setters from main and get the Getters from Another Class Java 7

Java
I have 3 classes; 1) Main 2) SettersAndGetters 3) AnotherClass. In my main class, I set the setters. And I am looking for a way to access these value...
2 years ago

Upload photos to OpenShift. Spring MVC

Java
I have deployed .war file of my Spring MVC app at OpenShift server. There every user can change there photos. It works at my localhost, but i need to ...
2 years ago

Is there any way to return from JFileChooser.showOpenDialog() programmatically?

Java
The context is here is unit testing: at the end of a test, at tearDown, if a JFileChooser is left "hanging" (i.e. displayed), I want to force it to re...
2 years ago

Android Device Physical Rotation readings

Java
I'm trying to read out the physical orientation of the android device in comparison to a specific start-rotation, but I cannot seem to get a proper ro...
2 years ago

Java Swing: Need a good quality developed JTree with checkboxes

Java
I was looking for a a JTree implementation, that contains checkboxes and which: When you select one node, all its successors in the tree are automat...
2 years ago

Gson Java reserved keyword

Java
I have some JSON that I am deserializing using Gson. { "resp": { "posts": [ { ... "public": true, ... }] } My problem is that publ...
2 years ago

Java 8 Pattern Matching?

Java
Will Java 8 support pattern matching like Scala and other functional programs do? I'm putting a presentation together of Java 8's Lambda features. I c...
2 years ago