java

java

  • All Sites

1 answer

Disabling site generation and deploy in maven

I have an existing maven project in which site goal is executed to generate and upload site to repository location. I need to disable only this site generation and deployment part from my maven ...

1 answers | 48 secs ago by V_Singh on Stack Overflow stackoverflow.com
1 answer

Supercsv example doesn't compile

This example straight from the docs at http://super-csv.github.io/super-csv/examples_reading.html doesn't compile. All lines in the new CellProcessor[]{...} generate the error "Incompatible types. ...

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

can someone recommend me a networking library for java

I need a nice and clean networking library for my java multiplayer game i'm programming.Any recommendations will be gladly accepted . I've heard of KryoNet and i'm interested but i would also like to ...

0 answers

Immutable class with behavior

I've just finished Effective Java and I loved it. I'm trying to refactor one of my programs to take advantage of what I've learned, and I have a lot of questions regarding immutability. My program is ...

1 answer

How To Read A Text File Via Scanner

I am trying to read from a text file, but whenever the program gets to my while loop it just skips over it. I used a previous example I had to check to see if I did it correctly, but it doesn't seem ...

5 answers

How can i check if an Akka actor exists (akka 2.2)?

I have a java object which is not an actor which selects actors from an actor system with actorSelection(Path)). It is possible, that the selected actor does not exist in the system. In the Java Api ...

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

Window freezes for one time when String is drawn

While I was making a 2D Game in Java, a (atleast to me) very strange problem occured. I've provided a runnable, shortened example which reproduces my problem. When the x-coordinate of the red square ...

0 answers

how to speed up prim's algorithm

I'm trying to optimize this following algorithm that determines a minimal spanning tree: public void Prim(int sVertex) { source = sVertex; boolean[] mstv = new boolean[maxSize]; for ...

2 answers

Calculate distance with JTS

I'm trying to get the distance between two points with JTS. The problem is that this function with JTS new Coordinate(Lon1,Lat1).distance(new Coordinate(Lon2,Lat2)) Is giving a different result ...

1 answer

Unit tests for Java classes

I am curious to understand how Java tests its APIs. Let's say,I am interested in the class ConcurrentHashMap, will there be any unit tests for this class? If so, is it available for public?

1 answers | 7 mins ago by dhanu05 on Stack Overflow stackoverflow.com
0 answers

How to draw tan graph achartengine

I am trying to draw a tan graph using achartengine. The problem is unlike sin and cos graphs, a tan graph has intervals or spaces in between multiple lines. I was wondering how achartengine supports ...

0 answers

Websphere library hell

I have a maven web app, using WAS 8.5.5. On app startup I'm getting the following error: Caused by: java.lang.NoSuchFieldError: org/apache/http/message/BasicLineFormatter.INSTANCE This means ...

1 answer

HackerRank Regex Challenge: Detect HTML Tags

Problem Statement In this problem you will use regular expressions to help you detect the various Tags used in an HTML document. Here are a few examples of tags: The "p" tag for ...

0 answers

Jackson @JsonUnwrapped creating empty beans

so i did research a lot on this problem but could not solve the problem of getting null structures. I have a complex set of pojos and mixins. Whenever i use @JsonUnwrapped annotation, my ...

0 answers

Implementing an ArrayList and getting individual values in Java

I've been trying to figure out how I could get the values of an array list over the last couple of hours and I just can't seem to find anything that actually useful that can answer my question. I'm ...

0 answers

JAXB @XMLElements global

Welcome, I am using JAXB mapping classes. This shows, for example: package pl.cba.lukaszbaczek.navisoftRuntime.client.pojo; import com.google.gwt.user.client.rpc.IsSerializable; public interface ...

1 answer

How to locate iOS Device model?

My question is as follows: How can I locate the device model name, the reason is as follows. I am writing Java code for Appium, and would like to create a certain logic gate that deals with different ...

1 answers | 17 mins ago by Ageoffan on Stack Overflow stackoverflow.com
0 answers

Creation of Programmatic Menu (Dynamic) PrimeFaces - Error in Redirect Submenu

I need some support with this, I'm out of ideas of what can be: I'm using JSF 2 and Primefaces, to develop a website where I need to dynamically create a MenuBar, I'm using the basic structure of the ...

5 answers

Local variables before return statements, does it matter?

Sorry if this is a newbie question but I couldn't find an answer for this. Is it better to do this: int result = number/number2; return result; or: return number/number2; I know integers use ...

5 answers | 18 mins ago by Sky on Stack Overflow stackoverflow.com
2 answers

Java accessing a string array in a method

I have a string array (variable) inside method A which is present in class A. Now I want to access it and set it with another string array from a method B which is in class B. class B is in class A. ...

2 answers | 19 mins ago by Ramachandra Bhagwat on Stack Overflow stackoverflow.com
0 answers

How to change military time to decimal time?

I have a little problem here with getDecimalTime method. I don't know if there is some kind of formula that will help me change military time (e.g 0645 -> 06:04 am) to the decimal time. public class ...

3 answers

Detecting variables through a string

I am creating a simple IDE using JTextPane and detecting keywords and coloring them. Currently, I am able to detect: Comments String Literals Integers & Floats Keywords The way i detect these ...

3 answers | 19 mins ago by user3188291 on Stack Overflow stackoverflow.com
3 answers

How to pass Job parameters to iteam processor using anotation

i am using spring batch and i have configured using annotation . Here is my question . how to set and get job parameters in to item process class using annotations .

0 answers

why String got appended with un-printable characters

I want to obtain ip address by using this following classes, and accidentally found out that the ipAddress from the following code sometimes contains un-printable characters such as DC2, CAN...I would ...

2 answers

Facebook: Getting Incorrect Signature (104) when Getting Session Key

I am trying to use the HttpClient library (in order to call the Facebook API's REST end points) to obtain a session key and verify user... My code is here: RunWith(SpringJUnit4ClassRunner.class) ...

3 answers

Read part of a JSON String using Jackson

The JSON string is as follows { "rank":"-text_relevance", "match-expr":"(label 'star wars')", "hits":{ "found":7, "start":0, "hit":[ {"id":"tt1185834", ...

3 answers | 23 mins ago by Gowtham Natarajan on Stack Overflow stackoverflow.com
1 answer

Setting HttpOnly in JBoss 7.1.1 throws error

I migrated my web.xml to 3.0xsd and added the following code to set cookies to HttpOnly <session-config> <cookie-config> <http-only>true</http-only> ...

4 answers

pascal triangle proper formatting java

so I'm currently working on an assignment that I just can't seem to finish. Well I have everything finished but would like the extra credit. I've been looking around the web and can't really seem to ...

0 answers

Adding a xml to a LinearLayout item in android studio

I have xml layout which includes a avatar picture a name and a textbox. These are all in one xml file. I would like to add instances these programmically to a linear layout that is nested in a scoll ...

0 answers

How to build API call to output a CSV file from a JSON object?

I need to create an API in Java which outputs a CSV file constructed from a JSON object. How can you convert a JSON object to a CSV file in Java and how do you return that CSV file for download from ...

15 30 50 per page
1 2 3