Questions tagged as 'java'

2
answers

Thread execution in android

I'm new to working with threads on Android and I'm having a hard time implementing them. The thread will be used to make a calculation and finally send an email depending on the result of the calculation, however I am not able t...
asked by 20.01.2018 / 12:05
1
answer

I can not register data using webservice Rest JAVA

When registering data in my database using webservice the following error occurs. Sending 'POST' request to URL : http://localhost:8080/FazendaWS/webresources/fazenda/Usuario/inserir Post parameters : {"login":"felipe10","senha":"1234","email"...
asked by 03.02.2018 / 20:41
1
answer

Access JLabels without using switch ... case

I'm developing a game with JLabel 1 to 50, I can access them in line of code without having to use a switch. You can verify that what changes in the code and only lblBoard1 or lblBoard2 and so on, who will determine JL...
asked by 04.02.2018 / 07:39
1
answer

Capturing the last 5 characters of a URI

Hello everyone, I would like to know how I can capture the last 5 characters of a link, for example in this link I would like to capture the characters ".m3u8" link     
asked by 19.01.2018 / 19:03
2
answers

How to go through an iterable?

I have a keysWithPrefix method for the purpose of returning all keys that start with an input value that is specified as in the implementation below: public Iterable<String> keysWithPrefix(String pre) { Queue<String> q...
asked by 21.01.2018 / 22:49
1
answer

How to use MySql in Java EE?

I have an application in java (desktop) that does some operations on writes the logs to a table in MySql, I need to make a page that will display this log. I did some testing, but I did not succeed. I'm using Tomcat 9 and eclipse to run....
asked by 27.12.2017 / 17:32
1
answer

Problem performing a select with JPA

I'm facing a bug that I can not figure out a solution to. When I perform a persist and then select the received and normal result, but when performing an update and after that the select instead of displaying the updated result the result of...
asked by 27.12.2017 / 18:10
1
answer

List with attributes that present difference between objects - Java

I need to compare two objects in JAVA so I can get a MAP with key and value of the attributes that have difference. I need this logic for a generic object, able to receive any type. Ex: OBJETO 1 - nome: João, email: [email protected]...
asked by 02.01.2018 / 20:07
1
answer

doubt with open and close connection

I would like your help with the connection below, when I close I have the following error, am I doing it correctly? with regard to opening and closing the connection? My pool public class MysqlConnectionPool { private final DataSource dataS...
asked by 02.01.2018 / 21:04
2
answers

Select returning dates on object other than what is registered in MySQL database

I'm having a problem when I'm writing the contents of a table and storing it in a list so the date is one day less. I've done a lot of research on the web and I did not find a solution to the problem. Below the registration method: publi...
asked by 26.01.2018 / 22:00