java

java

  • All Sites

2 answers

Java error when converting String in ArrayList to int

I am very new at Java. I am trying to write a lottery simulator. I have the following code: Scanner input = new Scanner(System.in); System.out.println("Enter six whole numbers between 1 and 49 in a …

0 answers

Transparent border around a JPanel

Trying to have a transparent strip below a JPanel: Edit: If that helps, my need is to design a vertical scale (a vertical ribbon) with marks. Marks are composed of a black horizontal line, and …

0 answers

How to access fields of converted json object sent in POST body?

Spring @Controller needs to access fields of passed object in json format. I woudl like to avoid building many classes to map every request responce to. For example, I need to connect store two ...

2 answers

understanding channel in java.nio package

For direct mapped buffer, they always stay outside jvm heap. Channels, on the other hand, seem to also exists in the IO operation. I'm just wondering if a the corresponding channel for the direct ...

2 answers | 1 min ago by jer_yin on Stack Overflow stackoverflow.com
0 answers

How to Check Array for 3 Numbers that Add to a Specific value in JAVA?

Alright guys, I've been stuck on this problem for a while now and have not been able to get past it. This is for Java. I'd appreciate any help at this point. Here are the details: Please note, we must …

3 answers

Hello World Multiple Buttons Separate Actions

I'm new to android development, and haven't programmed GUI's in java yet so button work is all new to me. I'm making a simple hello world app, has some buttons/radios/checkboxes etc. We have to ...

3 answers | 4 mins ago by TroothHertz on Stack Overflow stackoverflow.com
0 answers

Storing custom configuration in android

I am creating an android application and i need to manage how to display data of list view in some fragment .. My list view consists of multiple sections with a header on each section.. The data of …

2 answers

Android: find a Button in a Dialog

I have a Dialog which is called by my MainActivity. Inside this Dialog lifes a custom Button. When I try to get that Button in my MainActivity with Button createDateButton = (Button) ...

1 answer

verify text presence and visibility without locator in selenium webdriver

I have written code to verify text and visibility WITHOUT locator. please suggest guys, is this correct method? If there is any alternate method then your suggestion is appreciated. public class ...

1 answer

In Java, should each query be in a separate thread?

If an application is blocking until a query returns a response, doesn't it make sense to execute queries on a thread pool?

4 answers

Passing data between two separate .java files

I'm learning Java and I happened to come across an ActionListener example from Fred Swartz's leepoint.net webpage. DogYears2.java. For the sake of learning, I experimented by seperating the ...

4 answers | 4 mins ago by Javen on Stack Overflow stackoverflow.com
0 answers

Spring Batch Job Design -Multiple Readers

I’m struggling with how to design a Spring Batch job. The overall goal is to retrieve ~20 million records and save them to a sql database. I’m doing it in two parts. First I retrieve the 20 million …

0 answers

Caused by: java.lang.ClassNotFoundException: com.example.Example$ReduceTask while running maprduce job

I am trying to run the below mapreduce job but its giving me the class not found exception even though this inner class is present in jar . Can anyone give any hint ? package com.example; import ...

2 answers

How to send a message to an actor from outside in Play Framework 2?

I am new to Akka and trying to write some code in Play Framework 2 in Java and use Akka. To create an actor and send a test message to it, I have: public class Global extends GlobalSettings { …

1 answer

Eclipse will not Work?

I have two different versions of eclipse that both quit working on me, I am using windows 7 home premium, the versions of eclipse that I have are Eclipse Luna 4.4 and Eclipse Juno. I have done the ...

0 answers

Using custom factory HK2 DI with Jersey

I'm using the HK2 container in my Jersey application . I need to use my custom factory method to get the injected instance from the HK2 container. For example , public class Repository { …

1 answer

How Do I use RSA between Server and GWT Client?

I want to encrypt data between a Java Server backend and a GWT Client. On the GWT client I use the sbn.js library. It works very fast and is much faster that gwt-crypto. Here is How I encrypt on the …

1 answer

Websocket ClientEnpoint disconnect

I am using Wildfly 8.1 and I implemented a Websocket Server endpoint which works very well. I can push and receive data without a problem. (Javascript clients) Now I also need a client in java to …

1 answers | 13 mins ago by mkuff on Stack Overflow stackoverflow.com
0 answers

Best books for learning JIRA programming and development

Any ideas on how to best learn to program JIRA apps, plugins, etc. other than the JIRA documentation (which is good)? In other words, how does one become proficient with JIRA (which used Java and can …

1 answer

Including slick2d or slick-util in maven build?

I'm converting a project to lwjgl and trying to use slick-util as well. There's no slick-util maven repo anywhere (nor slick2d itself anymore). I've included local dependancies before using ...

1 answers | 14 mins ago by BotskoNet on Game Development gamedev.stackexchange.com
0 answers

Understanding dandelion datatable architecture?

When and where com.github.dandelion.datatables.extras.servlet2.servlet.DatatablesServlet is called/invoked. I know the purpose of this call. It respone back with the dynamic js/css filecontent from …

4 answers

How to convert a String number to two three decimal places in Java?

I am trying to convert a String number to two decimal places in Java. I saw lot of posts on satckoverflow but somehow I am getting an exception. String number = "1.9040409535344458"; String result = …

4 answers | 19 mins ago by user2809564 on Stack Overflow stackoverflow.com
1 answer

GreenDao getter for related entities returns empty list

i have an android app and use greendao to model my database. I have an easy szenario but I don't understand how i can make it work. I tried everything like said in the documentation but there must be …

1 answers | 19 mins ago by Emanuel on Stack Overflow stackoverflow.com
1 answer

Query with jpa multi-tables

Hi i have a query jpql to join multi-tables but when i debug it returns null results and when i excute it in oracle it works fine , the tables don't have any relation foreign key just the coloumns …

1 answers | 22 mins ago by fatyana on Stack Overflow stackoverflow.com
1 answer

How to “install” Stanford NLP into Java

I am still relatively new to to Java, so the simpler the explanation the better. I need to use the Stanford Natural Language Parser (http://nlp.stanford.edu/) in one of my programs. However, I found …

1 answers | 23 mins ago by systemcode on Stack Overflow stackoverflow.com
3 answers

Condensing basic code using || operator with a string

I'm quite new to java programming. I was unable to find any information relating to the use of the || operator with strings. I was wondering if there was a more efficient way to do this code in ...

3 answers | 25 mins ago by Aerebes on Stack Overflow stackoverflow.com
1 answer

Android login crashes

I am trying to build an app that has a basic login logout functions with database using JSON but whenever I login it crashes. According to the logcat the error is from my login class but i can't ...

1 answer

The maxLength attribute in EditText doesn't work as expected via xml and java

Maybe this is already answered but I can't find it on SO. I have a very simple requirement: Restrict the length of characters in an EditText. I use the maxLength tag in xml for this. The strange ...

0 answers

android: show progress of service's repeating process in main activity UI - performance query

This is a question about the best way to monitor the progress of a background service. my app has a main activity that starts a service. the service (independently of the main activity) repeats a ...

0 answers

Minecraft java issue

So i just bought Minecraft for my PC and installed java 8 and it was working fine until I installed the Java Development Kit 8 as well for some android development. Now when I launch the game I cannot …

15 30 50 per page
1 2 3