Questions tagged as 'java'

1
answer

Error with unit conversion

Can anyone help me with what is going wrong in this code? public class Conversor { public static String getUnidades(long quantidade) { return getUnidades((float) quantidade); } public static String getUnidades(int quantida...
asked by 13.06.2018 / 19:49
2
answers

Java - Get the value of a specific element from a JSON

I'm using the exchangerate API ( link ) to get the day's currency quotes. Using the code below I get a JsonObject containing the "rates": private JsonObject getExchangesRate() throws JsonIOException, JsonSyntaxException, IOException {...
asked by 21.06.2018 / 16:55
1
answer

Error generating barcode using JasperSoft

Trying to generate barcodes of products, using Barcode4j 2.1 of JasperSoft 6.5.1 , but when running on the JSF page of this error: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/apache/batik/bridge/User...
asked by 22.06.2018 / 04:36
1
answer

java.lang.NumberFormatException: For input string: "code"

I am developing a project with JSF, primefaces, maven and JPA with the specification of hibernate and PostgreeSQL DBMS (I created the separate database script, then connected with hibernate) and when I tried to run the page listing all the clien...
asked by 18.06.2018 / 02:33
1
answer

How to change an image using the commandButton in Java PrimeFaces?

Good afternoon, I'm developing a naval battle game in JAVA using Primefaces to make the front end. I would like a help to mount a commandButton that when clicked, trigger a function that will return if the house selected by the user is empty or...
asked by 16.06.2018 / 22:39
1
answer

Get record with SQL JDBC specifications

Hello, good afternoon. I'm having to develop a Java system with MySql. It's simple, just part of the backend, but I'm pushy and had not run querys with java before hehe. The system is the following, the basics: I have a database with a table...
asked by 10.05.2018 / 18:40
1
answer

How do I print on the screen the equal values of two integer vectors?

I did this using two for loops, but the teacher did not accept it. I need to make the comparison using only a while loop. EX. vetorA = {1,2,3,4,5,6,7,8} , vetorB = {3,4,7,8,9,10} This works, but it only needs to be a loop....
asked by 09.05.2018 / 01:01
1
answer

Terminal values for a program

I'm experiencing the following problem by running the following commands on the terminal, java -jar logisim-filename.jar adder-test.circ -tty table I get a table in the terminal, tab delimited, as follows: 00 00 000 01 00 001 10 00 01...
asked by 02.05.2018 / 01:22
1
answer

CardView within a ScrollView

I can not get the scrollview to work in my cardview .... As the scrollview works with a single child, I changed the main layout to ScrollView and created a linearLayout to encompass the rest within it. but it does not work at all, I did exactly...
asked by 05.05.2018 / 21:28
2
answers

How to use p: fileDownload to download a specific file

I have a datatable and I want to implement a download button to download the pdf file from that particular line. I have already been able to implement p: fileUpload and now I want to download this file that was uploaded. My upload method pu...
asked by 03.05.2018 / 00:58