java

java

  • All Sites

0 answers

Can't show certain UTF-8 characters in android webview

I know this problem has been documented elsewhere but the solutions don't seem to work for me. Other similar questions: Android WebView with garbled UTF-8 characters. Android WebView UTF-8 not ...

1 answer

Java Generics: compareTo and “capture#-of ?”

I'm trying to write an implementation of a BinaryTree whose object can be of any type that implements Comparable. However, I realize that won't completely work. For example, A String and a Double ...

1 answer

JAVA - Creating a Row of Colored Boxes with Loops?

I'm a beginner with graphics, as well as Java all together. It seems that no matter what I do, this program is not working! :( Anyway, the goal is to "Use nested loops, Graphics, and Math.random() to ...

0 answers

Check what data type the next line of a file is in java without moving the current scanner position

I have a input txt file as follows: int int String String int int String int int String int int String String int int String ... There will always be 2 ints followed by either 1 or 2 strings. The ...

0 answers

Window close animation

I'm having an issue where when I close a JDialog, I'm not getting any window-closing animation. It's not a huge issue, it just looks a bit odd how when you close the dialog it just vanishes. Is there ...

3 answers

Usage of StringBuilder for returning copies of a string

Given a string and a non-negative int n, we'll say that the front of the string is the first 3 chars, or whatever is there if the string is less than length 3. Return n copies of the front: ...

1 answer

PayPal-Java SDK/Credit card payment issue

My question is about the way how credit card payment is realized by PayPal API Particularly I'd like to ask about this code snippet from GitHub: ...

1 answers | 9 mins ago by mangusta on Stack Overflow stackoverflow.com
0 answers

java.lang.NullPointerException in Splash - Android Eclipse

I've done the Splash screen in Android and it was already successful, but when I run it again today It already give me an error. I don't even know why it happened, I never changed anything in my code. ...

0 answers

Serialization proxy

I've read that we should serialize only logical part of objects. And in case of linked list it means that we should not serialize any implementation details like nodes relation, but in fact only "list ...

2 answers

I want to adjust the size of logo2.png so that it completely fits to the jFrame. Can anyone help me out?

jLabel2 = new javax.swing.JLabel(); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Banking/logo2.png"))); // NOI18N JDesktopPane.add(jLabel2); jLabel2.setBounds(0, 0, 500, 290); ...

2 answers | 10 mins ago by Arafat Afzalzada on Stack Overflow stackoverflow.com
0 answers

Spring 4.1.4 refuses to load one particular context configuration - all others are fine

Upon getting a NoSuchBeanDefinitionException from org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder when trying to autowire a PasswordEncoder, I noticed that my security-context.xml ...

0 answers

How to fix javax.servlet.ServletException: BeanUtils.populate

My app is on a digital ocean server with ubuntu Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-43-generic x86_64) when I run java -version i get this output: java version "1.8.0_31" Java(TM) SE Runtime ...

0 answers

[homework][Java] Finding the largest combination of numbers out of 5 integer inputs?

This is for a homework assignment we have to do in class. As the title says, I have to find a way to figure the largest combination of numbers given 5 user inputs. IE if the user inputs 5,6,3,4,2 ...

15 mins ago by edkrs on Stack Overflow stackoverflow.com
1 answer

Cucumber-jvm Either the specified parameters do not match any of the following constructors: [private java.lang.Class()];

I am testing a simple Cucumber BDD test on Android and getting a cucumber error org.picocontainer.PicoCompositionException: Either the specified parameters do not match any of the following ...

2 answers

RestTemplate to NOT escape url

I'm using Spring RestTemplate successfully like this: String url = "http://example.com/path/to/my/thing/{parameter}"; ResponseEntity<MyClass> response = restTemplate.postForEntity(url, payload, ...

2 answers | 22 mins ago by Huw on Stack Overflow stackoverflow.com
3 answers

In Play 1.2, is there any way to secure a Controller provided by a module without editing module source?

I'd like to a use a Controller provided in a module but the Controller is not secured. I don't want to edit the source of the module as this will become a maintenance overhead. Does Play offer any ...

1 answer

Check an ItemStacks's name and lore

I'm new to making Bukkit plugins, but I've run into a problem, and I can't find the answer to anywhere. Here's my code: @EventHandler public void onUseCoupon(PlayerInteractEvent event) { ...

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

How to limit the number of ads per session in Eclipse?

I have an app that displays an interstitial after a certain number of actions on a few pages of my app. I am afraid that a user may wander around my app and have a whole bunch of interstitials ...

1 answers | 23 mins ago by Tom on Stack Overflow stackoverflow.com
1 answer

Android: How to pass parameters from OnClickListener to another

I'm new to android and Java. I wanna pass a variable (ac) from OnClickListener to another. I've tried this way, but i receive this error: cannot resolve symbol 'ac'. Can you help me please? Button ...

18 answers

Initialization of an ArrayList in one line

I want to create a list of options for testing purposes. At first, I did this: ArrayList<String> places = new ArrayList<String>(); places.add("Buenos Aires"); places.add("Córdoba"); ...

0 answers

Problems running java webstart jnlp file

Sorry for the long post but I am trying to be thorough in order to solve this issue. Others have asked this question but I believe I followed all of the instructions found here, and read all of the ...

3 answers

App crashing when trying to use RecyclerView on android 5.0

I'm trying to mess with the new recyclerview and whenever I try to run it, my app immediately crashes. It gives me a null pointer exception for trying to access methods from ...

2 answers

SSL Client authentication, but no server authentication?

Is it possible to disable server authentication by the client when using rmi over ssl? But I do want to keep using client authentication (setNeedClientAuth(true) on sslserversocket) on the server. ...

2 answers | 28 mins ago by TinusSky on Stack Overflow stackoverflow.com
1 answer

Inserting items in DynamoDB Range key

I have created a DynamoDB table with following details: and I'm trying to insert items in my table: public static void insertItems() { AmazonDynamoDBClient ddb = ...

0 answers

java - convert a single docx paragraph to html <p>

I need to convert a single paragraph cut from docx xml file, like <w:body xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:p><w:r><w:t ...

3 answers

How to read excel data into vector table

Sorry, im new to java. I have changed the method from JXL to Apache POI to read excel file. Now im struggling with the java code. i can get the return output from my vector dataholder it listed all ...

2 answers

indexOutOfBoundsException with arraylists deletion

I am writing a space invaders knock off in java and I am almost done the actual working parts but I keep on getting this error: Exception in thread "AWT-EventQueue-0" ...

0 answers

Form displays nothing when debugging android in Eclipse

The form for viewing has textviews, a listview and a button, but it only display a white blank form during debugging. view_dates_e.xml: <?xml version="1.0" encoding="utf-8"?> ...

5 answers

Java: I don't undestand this generics defintion at all

I have some sorting methods that in order to work they need to accept an object that has the compareTo defined. The following as part of the generic definition: private static <SomeType ...

4 answers

Is it possible to disable SSLv3 for all Java applications?

Because of the Poodle attack it is now recommended to disable SSLv3 for client and server applications and only allow TLS 1.0 -TLS 1.2 connections. Is there a way to disable SSLv3 for all Java based ...

4 answers | 45 mins ago by Robert on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3