Questions tagged as 'java'

1
answer

Using Gson instead of Jackson on web service that makes use of Jersey

I found that Jersey by default makes use of the Jackson framework for resources to return data in Json format. However, I had the need to use the Gson framework to convert the objects to Json. How to do this if Jersey uses Jackson implicitly?...
asked by 11.05.2017 / 16:06
1
answer

Popular JComboBox with strings and IDs brought from the database

I need to popular%% with the data brought from a table in my MySQL Database, but I do not know how to leave an item linked to the corresponding ID. Example: ID 1 refers to the ADM profile and ID 2 refers to the Default profile. If the user se...
asked by 11.05.2017 / 23:23
1
answer

Adding values from an array

I'm trying to make this code, which is basically a 6x6 two-dimensional array with the distance between 6 cities, then collect the route the user made in a simple array [6], and calculate the total miles that he traveled. The code: package r...
asked by 23.04.2017 / 00:06
0
answers

Question How to recover data in blob format and display in jsp

I'm not sure how to do this, but I'd like to know how to do this. even some example so that I can address myself, I'm using mysql as a database.     
asked by 09.05.2017 / 19:53
0
answers

How to check if my table has related records?

I'm developing a project using JPA and with various relationship types like OneToMany, ManyToMany, etc. Is there any way I can check if an X table for example has related records in another Y table? I can use Reflection but I do not see this...
asked by 20.04.2017 / 21:03
2
answers

OnListItemClick not working in ListFragment

The Toast of the onListItemClick method never appears, does anyone know what I did wrong? Code: public class TiposFragment extends ListFragment { private ArrayList<Tipo> tipos; private TipoAdapter tipoAdapter; private int selecionado; @...
asked by 05.05.2017 / 02:43
0
answers

Search using Thread

I am looking for files using threads, the code I developed looks for the correct file, but it happens that it does not finish the execution when it finds, that is, if it does not find it, it continues to execute. import java.io.File; import jav...
asked by 04.05.2017 / 16:41
1
answer

Keep login active in the application android (firebase)

Good morning, I'm having a hard time, I made an application using firebase authentication and every time the application is opened it asks for login, how do I keep this login active once it has been done and open the "restricted" part of the dir...
asked by 11.05.2017 / 15:25
2
answers

How to read the .csv file and write it in a list?

I'm starting in Java and I'm having trouble reading from a file and publishing to a list. The list is pre-defined. List<Atleta> listaAtletas = new ArrayList<>(); The Atleta class has no problems and has the follow...
asked by 01.05.2017 / 02:28
0
answers

Order of Events Listeners

I have a tableView with a listener when selecting a new row from the table view, and I have a textfield that gets a value from one of the tableView columns; The textfield has a listenter when losing the focus of the field it updates the value...
asked by 29.04.2017 / 17:12