• All Sites

1 answer

How to fix the graphics of the rubiks cube in javafx

I was trying to make a rubiks cube in javafx an ended up with a very bad model as given in this Image. I am giving my source for code for this, where I have used RectangleBuilder class to create ...

1 answers | 5 secs ago by Debarun Mukherjee on Stack Overflow
2 answers

Spring Candidate Bean Type Strategy is bad

Having, an application with a multiple databases, and dynamic EntityManager scope. I figure that Spring creates all condidate beans for some Type, before filtring the qualified bean. So in my case, ...

2 answers | 25 secs ago by Nassim MOUALEK on Stack Overflow
0 answers

Java game hit button only once

Hi all I'm programming a 2D game (mario clone) and I have a little problem: is there a way to remove the fact that if I press the fire-button and i keep it pressed it start spawning milions of ...

1 answer

Tomcat reporting 404 error on all of newly deployed WAR files?

I deployed a WAR file into $TOMCAT_HOME/webapps by copying the file into the directory, just like I've done a thousand times before. Tomcat detects the WAR and inflates it. I can traverse the ...

2 answers

Unchecked cast to generic class implementing Map<String, V>

I'm trying to understand why this code has an unchecked cast warning. The first two casts have no warning, but the third does: class StringMap<V> extends HashMap<String, V> { } class ...

6 answers

How to get a value inside an ArrayList java

I am trying to get a value from with in an ArrayList. Here is a sample of my code: public static void main (String [] args){ Car toyota= new Car("Toyota", "$10000", "300"+ "2003"); Car ...

6 answers | 3 mins ago by blackStar on Stack Overflow
0 answers

Parsing address line in java

I want to parse using java 8 ,the address line from data file such as 1300 SE CARDINAL CT BLDG 10STE 100 Vancouver Wa 98683 US 345 middlefield rd ms 999 Menlo Park ca 94025 united ...

3 answers

Infinite while loop assistance

I am learning Network Programming in Java Core. Here is something I can't understand. Take a look at this snippet This loop seems infinite. But I sure know it could stop (not by exiting the ...

3 answers | 3 mins ago by Cuong Hoang on Stack Overflow
1 answer

keyCode if/else commands

I have google voice recognition integrated into my project. With the google voice recognition their is block of code you must write, inside of that block of code you are suppose to put the code for ...

1 answers | 4 mins ago by fafafa on Stack Overflow
2 answers

Compare two dimension array with JTextField

I trying to solve a this problem from 3 days and its difficult and I can't find how to solve it. I tried to compare two dimension array from another class to ActionListener class with JtextField that ...

2 answers | 4 mins ago by JOJO on Stack Overflow
1 answer

Compile Equinox 3.8.2 Project with java 7

I need to create a gradle buildsystem for multiple OSGi Projects using Equinox 3.8.2. We use Java 7. But now my Gradle script failes when compiling projects using the ServiceTracker: ...

4 answers

LibGDX: Particle scale

In my game I use static final float FRUSTUM_WIDTH = 10; static final float FRUSTUM_HEIGHT = 15; So when I draw the particles they take the whole screen and are huge! So how do I scale them down ...

1 answer

for-loop not iterating completely

I am trying to create an algorithm that will test if a given string is a cover-string for a list of strings. A string is a cover string for a list of strings if it contains the characters from each ...

1 answer

In process of making snake game, Can't figure out how to make the movement right

Im currently making a snake game in jgrasp only using the standard draw movement and static methods to create this game, So far this is the code I have because i just started yesterday. But I'm ...

1 answers | 7 mins ago by Reed Sager on Stack Overflow
1 answer

How to solve lint warning “field is never used” but it is serialized

I have a small class in my Android project containing some variables, I assign them in the constructor. I then serialize the object to json using the Gson library and the function String ...

1 answers | 7 mins ago by user5441518 on Stack Overflow
1 answer

Cannot send messages over stomp using Spring messaging

I am trying to send and handle message from browser over STOPM using spring-messaging. But message is not sent. Some code now: @Configuration @EnableWebSocketMessageBroker public class ...

2 answers

Boolean algorithm producing true output when output should be false

Basically i am trying to create an algorithm that will test whether a given string is a cover string for a list of strings. A string is a cover string if it contains the characters for every string in ...

2 answers

Strange error in mapreduce class

this error seems trivial, but it won't go away. I have the following class defined: import; import java.util.Iterator; import java.util.StringTokenizer; import ...

0 answers

Upload image to Google Cloud Storage failing in local Dev Machine(After specified retries) - GAE/Java/GCS-client-library

I am using GAE SDK 1.9.25 And GCS client library 0.5, In local dev machine when I try to upload image, it is failing after trying specified attempts. Nov 30, 2015 9:20:13 PM com.csn.util.GCSUtil ...

1 answer

Java decode from ASCII

I have set up a custom encoding that has to do with ASCII. It is as follows: All lower case letters are converted to capital letters. The first letter in the encoded message is stored as its ASCII ...

1 answers | 10 mins ago by Jake Petersen on Stack Overflow
0 answers

StreamCorruptedException: invalid stream header

I have a class Serializer public class Serializer { private Serializer() {} public static byte[] serialize(Object obj) throws IOException { ByteArrayOutputStream b = new ...

4 answers

How to use hbase with Spring Boot using Java instead of XML?

I have Spring Boot Hadoop and want to take advantage of the Spring HbaseTemplate. My issue is the documentation has only information about the "xml" way of the configuration and setup. How and where ...

2 answers

How do we make a java class immutable if it has a member variable of another user defined class?

Recently in an interview for Java Developer role, I was asked how do I make Class A immutable if it has a member variable, which is an object of Class B and in a situation where Class B is external to ...

0 answers

Modifying a double list with “move all” button

I am working on a GUI (that this community has been extremely helpful with so far) and I have reached another important step I need to achieve. Currently my GUI consists of a JOptionsPane. Inside ...

2 answers

How to calculate insered number from set of numbers?

Hi everyone I'm beginner in java, and I have homework and don't know to do it. I have to make a program who will help cashier with their work. They have for return money set of 1,2,5 and 10 ...

2 answers | 12 mins ago by Johny on Stack Overflow
1 answer

Oozie > Java action > why property does not work

I am working on Oozie with a Java action. The Java action should use Java option -Xmx15g. Accordingly I set the property to 25600 (25G) in case some extra memory is ...

1 answer

Input Missmatch Exception with Scanner

I have problem with this peace of code: String name; Scanner scan = new Scanner(; name =; When i enter string with space in it( for example "Alfonso Alfonsov" ) this throws ...

0 answers

(com.itextpdf.text.ExceptionConverter) java.lang.ArrayIndexOutOfBoundsException: 256

I've been using itext to extract text from pdf, it works fine but certain pdfs arise some problems. It sounds very weird because I can normally open it with acrobat reader. I've read a little about ...

0 answers

Kerberos how to get principal/client name?

I have a user configured in domain with delegated kerberos ticket: klist Ticket cache: FILE:/tmp/krb5cc_527 Default principal: user1@EXAMPLE Valid starting Expires Service principal ...

15 30 50 per page
1 2 3