Questions tagged as 'java'

1
answer

Socket connection causes exception in Android

The code below works perfectly when only used with a JButton, but when passing to Android happens the exception (Exception). I have found that the error is in clientSocket = new Socket(serverIP, serverPort); but I can not understand the...
asked by 18.05.2014 / 17:17
1
answer

How do I add a different object to a list every time I use the add?

I'm having trouble adding a different object to a list of objects every time I use the add of it, I know the problem but I do not know how to fix it, follow the code Class list public class Lista { NodeLista inicio; NodeLista fim;...
asked by 24.05.2014 / 21:32
2
answers

How to avoid LazyExceptions?

My application faces numerous LazyExceptions issues and what causes a "filth" in the server log. I understand that they occur because the connection to the database has already been closed and I am trying to recover some attribute / object that...
asked by 26.01.2018 / 19:49
1
answer

Validation of number of sessions with spring boot and spring security

I need to validate the number of sessions that may exist, so that the user can not log in to two places at the same time with the same credentials. Reading the Spring Security documentation and posts, I got the implementation below, but it does...
asked by 16.01.2018 / 21:12
1
answer

Writing to txt file write, read and write to another file in txt

I started working a little bit at a company that programs the MiFire cards and I'm in the experimental phase. Meanwhile the engineer told me to do a job. First step: I have to enter two numeric values and get the result of the sum; Save in...
asked by 12.12.2017 / 11:36
2
answers

JOptionPane in the foreground

I have an app that uses JOptionPane to show an error message, however I would like JOptionPane to always appear in the foreground. JOptionPane.showMessageDialog(null, "Usuário ou senha incorreto!", "Erro", JOptionPane.ERROR_MESSA...
asked by 01.11.2017 / 19:29
1
answer

Get cookies from a session started with HTTPClient on android

I do a post with android and HttpClient on a page, but I need to know a way to get the cookies from that connection. This is the code I use to make the post public static void postData(Activity activity, String user, String password) {...
asked by 08.04.2014 / 22:28
1
answer

Android getDeclaredFields value

I am doing an android studies, I do not handle much of the subject since I am starting now, I would like to create a simple mvc of CRUD, where I want to call model.save() ; Then I created the following structure: MainActivity.java...
asked by 31.03.2014 / 21:34
1
answer

Socket with Timertask

I want to ask for serverSocket a response (some information) every 5 seconds. I set up my socket and I'm using a TimerTask to execute a method every 5 seconds, but only the first execution is successful. Attempt one...
asked by 10.04.2014 / 22:43
0
answers

Inventory with Android [closed]

I'm trying to create an app to control product type an inventory, in case the user selects in RadioButton product and then with scanner will read the serial of the equipment. The scanner is working, but the RadioButton and inven...
asked by 27.10.2017 / 15:03