Questions tagged as 'java'

2
answers

View .HTML with VRaptor. It's possible?

I'm a Systems Analysis and Development student and I love programming, I've studied the basics of Java and I'm working on frameworks just to get a feel for it. How do I return an HTML page in a controller with VRptor instead of JSP. I'm d...
asked by 21.01.2015 / 17:36
1
answer

Project structure

I have a project being developed with VRaptor and I have a question about structure of project. The project I'm developing will be installed on multiple clients, each with a different structure. I do not know how the JPA configura...
asked by 06.01.2015 / 14:09
1
answer

JDBC SQLite - Java

Good afternoon, How do I make the connection to SQLite DB? I made the connection class like this. package model; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class Conexao { public st...
asked by 31.07.2014 / 18:27
1
answer

Problem generating javascript graph using Spring

I'm implementing graphics in a web application I'm developing in Spring. I have already done my API, is bringing Json with all the information of my Cart object, but the graph is not being generated in the html page. Can someone help me solve th...
asked by 21.07.2018 / 22:00
1
answer

Exception in division by zero in Java [duplicate]

Why does this generate an ArithmeticException / by zero: for (int i = 1; i <= 5; i++) { System.out.println(i); int a = i / 0; System.out.println(a); } And that does not (print "Infinity")? for (int i = 1;...
asked by 01.05.2018 / 09:37
1
answer

Query using Hibernate does not record

I'm trying to query the HSQLDB database using Hibernate but I'm not succeeding. When I do: session.get(Usuario.class, new Integer(1)); Query is done because it shows the query mounted by Hibernate. But it does not have any registry, even...
asked by 19.05.2018 / 17:09
1
answer

Java: Convert point-delimited strings to nested JSON

I have a lot of attributes coming as dot-delimited strings like "company.id", "company.address.number", "user.name", "isAtive", and I need to create a nested JSON with their respective values. These attributes and values are in a HashMap. Not...
asked by 12.07.2018 / 19:40
2
answers

Get ScrollPane size when set by anchor - JavaFX

I have a ScrollPane anchored on the 4 sides of an AnchorPane so that when I resize the screen, the scroll also resizes. So I do not need to specify a fixed size. That's how it works. The problem is that in this way the methods getPrefWidth...
asked by 20.07.2018 / 03:14
1
answer

Compile error using AudioPlayer class

When trying to compile the code below: import javax.swing.*; import sun.audio.*; import com.sun.java.util.*; import java.awt.*; import java.awt.Event.*; import java.io.*; public class filechus { public static void main(String[]args) {...
asked by 12.12.2014 / 00:26
1
answer

Java class for builder and dependency management

I have projects using gradle as dependency and build manager, I know the power of the gradle, but not the domino, this matter of being a dynamic language (groovy) forces you to know 100% of the commands you type! It does not have code completion...
asked by 22.12.2014 / 16:30