Questions tagged as 'java'

1
answer

Direct PDF Printing on the Printer in Java

So, I need to print a PDF directly to the printer, because I need to print invoices. If I use this form Desktop d = Desktop.getDesktop().print("Caminho do arquivo") it prints normally the first time, but opens the adobe together and the a...
asked by 19.09.2017 / 21:02
1
answer

Problem in displaying JCalendar-1.4

Hello, fine, everyone! I'm creating a program and I'd like it to have a calendar on the main screen. I searched and found jcalendar-1.4, but when adding it some numbers are not displayed (they get three dots). Could someone help me with the conf...
asked by 13.04.2014 / 20:13
2
answers

How to write to a text file concatenating with existing text in Java?

I would like to write to a text file using Java, but whenever I am going to use the write BufferedWriter functions the previous text is deleted and the new text is written, I would like to keep the old text and just concatenate the new...
asked by 05.02.2014 / 14:58
1
answer

Error when deploying on Wildfly

I'm getting an error while trying to deploy my application on Wildfly 8:    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011445: Failed to get adapter for persistence provider 'org.hibernate.jpa.HibernatePe...
asked by 10.02.2014 / 19:15
1
answer

How can I tell if a socket is "listening" to the server side?

When I use the isConnected() function of java.net.Socket ", on the client side, and it returns me true I can be sure that the server Are you listening? Otherwise how can I know? Just with a wait time between establishing a c...
asked by 25.05.2017 / 16:22
1
answer

Spring MVC x Spring MVC Boot

What's the difference between Spring MVC and Spring MVC Boot? Are they the same thing? Is there any advantage in using the second? Thank you     
asked by 14.05.2017 / 03:54
2
answers

Is it possible to do an INSERT and an UPDATE in the same query in java?

I would like to know if it is possible to make a INSERT and a UPDATE in the same query, that is, in the same operation. I'm using the following to do both. public Connection conn = null; ... conn = DriverManager.getConnection...
asked by 13.01.2017 / 01:16
2
answers

Retrieve json object

I have the following object: { codigo : "1", nome : "Carlos" } Java class (POJO) public class usuario{ @SerializedName("codigo") private int codigo; @SerializedName("nome") private String nome; /* ... */ } The ca...
asked by 09.08.2017 / 16:20
1
answer

How to leave the line border drawn with Graphics in Java straight?

I made a program that draws lines on the screen, but the line gets very deformed (image 2) on certain links. I would like to know if there is a way to make the edge of the line straight (image 1), whatever the tilt of it. I'm using Graphic...
asked by 29.03.2018 / 18:39
1
answer

How to turn a number reading directly into stream?

Recently I wrote a response by exploring Java's stream API a bit more, but I should say that I was disappointed with some details of my code. The idea was to read a sequence of numbers and then return the highest and lowest value of...
asked by 27.03.2018 / 04:36