Questions tagged as 'java'

1
answer

How do I kill a websocket?

I'm having a hard time killing the websocket that runs within my application in java, I can not find answers anywhere. I need this, because I'm using it with a chrome extension to fill a website's forms, but when I refresh the page or close...
asked by 03.02.2018 / 02:38
1
answer

Pull AsyncTask class return

I have a Main class that runs a receberSolicitantes() method with a task in background . While it runs, it updates a progressBar . Everything is working perfectly with the method as follows: public void receberSolicitan...
asked by 22.02.2018 / 20:41
1
answer

SQLGrammarException

Good evening! Can someone help me with the error in my code, I followed the steps of the teacher but presents error in mine and not in his example. I'm using the same dependencies. Here is the snippet of the method and the error. public List&l...
asked by 20.02.2018 / 04:13
1
answer

Encoding problems in the eclipse console

When reading the contents of a file to print the same in the eclipse console, I have a pronounced word and it's coming out like this in the console: é um teste The correct display is: é um teste I checked the eclipse Run options and m...
asked by 16.02.2018 / 18:50
1
answer

Enable and disable Android alarms via code

I'm creating an application, and in some parts I'll need the app to turn on and turn off alarms (from my phone itself). I searched the internet but did not find anything that would help me not described. I do not know which classes or library ca...
asked by 20.02.2018 / 12:53
1
answer

Error Access restriction: The type is not accessible

I'm trying to develop a simple screen in java using JFrame but in my eclipse it's showing a message in JFrame .    Access restriction: The construction JFrame (String) is not accessible   due to restriction on required library   ...
asked by 06.04.2018 / 01:39
1
answer

Manage connections to the database correctly using hibernate

What would be the best default for connections, I thought of two modes: Mode 1: Each function creates and closes its own connection Function 'insert' EntityManagerFactory factory = Persistence.createEntityManagerFactory("Taref...
asked by 06.04.2018 / 23:42
1
answer

Captures what the user types and writes to a .TXT

I made a program in JFrame, basically it captures what the user types and writes to a txt, but when I go to see the contents of the file is written, the following "null". What could be happening? importjava.io.BufferedWriter;importjava.io.Fi...
asked by 03.04.2018 / 20:33
1
answer

Upload Empty Spinner

When generating a Spinner , it returns the first value of the ArrayList generated already selected. How do I bring it "empty"? The best option would be to populate it with a onClick function instead of doing it in...
asked by 25.01.2018 / 16:07
2
answers

How to use a .JSP file

I am extremely new to the JSP language, I wanted to know how to use a jsp file that I created and exported for example in the browser, the same way I do with html files, ie how to use a jsp file created ??? obs : In the attached image is the re...
asked by 11.04.2018 / 15:58