Questions tagged as 'java'

1
answer

Framework to read json google maps api

I would like to know if there is any framework to read the data that comes in json from google maps directions? type, get the data and put in variables that I can pick up and use in the rest of the application     
asked by 10.11.2017 / 15:14
1
answer

Alternative String.replace ()

I have a flea behind my ear. I have a method that removes / changes some characters from the string, it's something like this: public static String replaceCharSet(String texto) { texto = texto.replace("&", "E"); texto = texto.re...
asked by 07.11.2017 / 14:27
2
answers

Relationship between bean and view

I have three views that show the same table with a sequence of leds and information, I have a service class that does the business logic to know which led and which color to display, in my bean responsible for the view I get...
asked by 28.06.2017 / 15:09
2
answers

Sort a list of objects by more than one attribute

How to sort a list of objects by more than one attribute? The first is the ordering of the score, then as a tiebreaker we have the number of victory and then the balance of goals. Something like this: Pontuacao pontuacao = new Pontuacao(pon...
asked by 01.12.2014 / 21:27
1
answer

JasperView closing the entire system

I do not know how to explain this, but I'll try. I have a system made in JavaFx that displays reports with Jasper according to the selected item, so quietly selecting an item and sending print works, however when closing the report generated...
asked by 12.05.2017 / 16:37
1
answer

"Listen" directory using Java

I'm working on an application, and I need to create a functionality, such as a method, that is "listening" to a certain directory. The directory is used as the destination for * .xlsx file uploads. I need every time a new file exists, my appl...
asked by 16.07.2014 / 19:18
1
answer

Implement Runnable or Extend Thread?

In several Java projects, I've seen these two ways to create Threads: With implements Runnable : public class MyRunnable implements Runnable { public void run() { //Código } } //Iniciada com uma chamada "new Thread(new...
asked by 04.04.2017 / 16:50
3
answers

Send e-mail with STARTTLS port 587

I need to send an email using the client settings. Host access uses STARTTLS security using port 587. For testing I put the following code (I changed the client data for security): try { String host = "200.201.202.203";...
asked by 22.07.2014 / 22:32
1
answer

Button that sends email to contact the developer

How do I create a button that the user clicks it sends an email to another pre-defined email?     
asked by 24.03.2017 / 01:37
2
answers

Handling Exception Services REST Spring

In a REST service application with Spring, where should exception handling / posting occur? No Controller or Service? Example 1 - Handling the Controller (In case I'm just returning a badrequest as an example) @GetMapping public ResponseEnt...
asked by 21.03.2017 / 16:54