Questions tagged as 'java'

1
answer

Trigger an event by pressing the 2x volume button?

I would like to trigger an event only by pressing the 2x volume button quickly. I have the following code, but it fires when I press the button once. How do I trigger it only by pressing 2 times at a certain speed? Follow the code: @Over...
asked by 13.06.2017 / 15:01
1
answer

Match functions if

   I have Codes of if and else, but I do not know very well, I will explain what I wanted to do, in my app, if I typed Right, post in api as id - X, if I typed Romance, but it is only posting with either X, or as Y, I believe either error in the...
asked by 13.06.2017 / 21:15
0
answers

Gson Does Not Convert List In Json

Every time I try to pull all the data from a database table and convert the result to json, using Gson, it gives error. @GET @Path("todos") public String todos() { Gson g = new Gson(); UsuarioRepository usuarioRepository = new UsuarioR...
asked by 29.03.2017 / 16:01
0
answers

.java file without class signature

I was checking out the PrimeFaces code when I came across the following situation (import java.util.List; import java.util.Map; import org.primefaces.util.HTML; import java.util.logging.Logger; import org.primefaces.util.ComponentUtils; p...
asked by 24.08.2017 / 13:37
0
answers

JAVA - Is there any way to send a print to Windows Spooler?

I would like to know if there is any way to send a print to Windows Spooler via java ... I tried via Socket, PrintWriter and everything else, but I can not send it to Spool, just directly to the printer !!!! >     
asked by 17.08.2017 / 22:00
1
answer

Result of the GET method brings all the relations and the subrelations of the bank

I have an application in which I have a list screen I'mdoingaGETmethodonmySpringBootAPIClasscontroller@RequestMapping(method=RequestMethod.GET,value="/distritos", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Coll...
asked by 05.10.2017 / 16:04
1
answer

Problem inserting data with methods. Java / Mysql

I get the following error when I try to add a new data into a table in my Database. I have a class whose name is Banco de Dados , another whose name is ShowMenu and another whose name is Principal . And I get the following...
asked by 16.09.2017 / 21:53
0
answers

Opening SQLite3 on Windows10

When I open SQLite3 in Windows 10, it simply opens the command prompt, giving the command permission in front of the sqlite > line line. Already in windows 7 and 8 it opens normally. My intention of using SQLite is for a simple connec...
asked by 31.03.2017 / 17:40
1
answer

Object is not updated

In my stream it looks like this: I already have an object stored in the database. When loading my page, these objects are fetched in the database, treated to be displayed. Objects arrive in a List ( List ), that is iterated by f...
asked by 31.03.2017 / 23:58
0
answers

How to generate XSD that requires sending the contents of an XML element using JAX-WS

I'm creating a web service with JAX-WS. In an operation, I get an object that contains some attributes and I want these attributes to always come with value. @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public class RequestConsultarMa...
asked by 31.03.2017 / 21:52