Questions tagged as 'java'

1
answer

Multiples @ElementCollection in two different classes @Embeddable

I have an entity with two Embedded classes of the same type, and each has an ElementCollection of the same type, too. The business logic seems to be correct, but I'm experiencing some problems with the lack of knowledge in JPA. Here are m...
asked by 18.08.2016 / 19:09
1
answer

Increment in Java vectors

I have doubts about some lines of a code, I'll put them in the form of a comment. Following: import java.util.Scanner; public class Teste131 { static final int max = 100000; public static void main...
asked by 25.10.2016 / 20:51
1
answer

Error creating table with flyway using maven

I have this error below when creating the wine table using flaway, this is a maven project, does anyone know why this error? Properties spring.jpa.database=POSTGRESQL spring.datasource.url=jdbc:postgresql://localhost/wine spring.datasource....
asked by 08.08.2016 / 19:06
1
answer

MediaPlayer.create () stops working after some sounds [duplicate]

Hello, I put a different sound to touch each button pressed, but after 4 starts it simply stops. Code: numero = random.nextInt(numeros.length); MediaPlayer soundID = MediaPlayer.create(this, getResources().getIdentifier("s" + numeros[nu...
asked by 06.08.2016 / 07:07
1
answer

Problem with nextLine () after nextInt () on a Loop [closed]

I have this code to remove from a ArrayList , and a while to check if the user wants to continue removing elements. But when the remove value is true the logic "skips" the next question ( Do you want to continue? ). package AList;...
asked by 18.10.2016 / 01:05
1
answer

Hide button (p: commandbutton), Primefaces, with api PF

I'm trying to accomplish something seemingly simple, but I'm taking a damn spanking ... Studying, I read that Primefaces has a javascript / javascript api, so I decided to take a look. It turns out that I can not hide a button in any way, tried...
asked by 17.10.2016 / 19:48
1
answer

How do I get the response of an HTTP GET using HttpURLConnection java.net?

I have the following class: package com.akamai.edgegrid.auth; import java.io.*; import java.net.*; public class C { public static String getHTML(String urlToRead) throws Exception { StringBuilder result = new StringBuilder();...
asked by 14.07.2016 / 21:35
1
answer

Resetting InputStream

I have a WebService that saves the photo to a server folder that was sent by the Android application through the following code: ... int read = 0; byte[] bytes = new byte[1024]; OutputStream out = new FileOutpu...
asked by 14.07.2016 / 17:09
2
answers

How to receive user date through JTextField, using JodaTime?

I'm not able to do user input. I want the program to make the difference in days between today's date and the date entered by the user. The program has more implementations but it's just that part that is not working. private JTextField dataVe...
asked by 31.07.2016 / 07:36
1
answer

GetResponse - HttpURLConnection

I'mtryingtogetagetResponsereturn.IcanseethereturnwithSystem.out.println,butIcannotgetthesamereturninsidetheapplication.HttpURLConnectionconexao=(HttpURLConnection)url.openConnection();conexao.setDoOutput(true);BufferedReaderin=newBufferedReader...
asked by 26.07.2016 / 14:16