Questions tagged as 'java'

1
answer

How to convert a byte [] from an image to a jpeg image to load in html?

In the html (jsp) of register I have a field that the user registers his photo getting the tag img with the following result. <img src="data:image/png;Base64,/9/0kmkdmkewnsjdncijndcjdxncdjcdscjnccc/ccnkjdncnsjnidckcmokcmoskcmkosmcokm...
asked by 11.03.2016 / 19:11
1
answer

Profile network java (jdbc)

What tool can I use to evaluate the response time of a request (jdbc) Ex: query = "SELECT * FROM v$version WHERE banner LIKE '%Oracle%'"; ResultSet rs = stmt.executeQuery(query); // linha de cima ⋀ // quanto tempo demorou nesse meio ? // l...
asked by 07.03.2016 / 20:16
2
answers

Help with Java exercise

I have a problem with a JAVA exercise, I can not fix it, although I'm pretty sure it's pretty simple. It's a simple crud: Below is the main code import java.util.Scanner; public class Crud{ public static void main(String[] args){...
asked by 02.01.2017 / 17:30
2
answers

Error related to binary tree element removal and child relocation (java.lang.NullPointerException)

Hello everyone. I started studying the Java language recently and decided to try to create a binary tree with three functions: 1 - Add element to tree 2 - Search and print tree element 3 - Remove element from the tree (relocating your c...
asked by 03.01.2016 / 23:04
2
answers

Doubt regarding JPA management with Spring on JEE server

I'm starting in Spring MVC and in the book I'm reading the configuration and management of connections is all done by Spring, that is, Spring opens and manages the connections with the bank and makes this available as if I had a JEE server (% wi...
asked by 13.12.2015 / 23:54
1
answer

Aggregation and composition in various relationships

Given a class A, let's say that the relation between this class A and a class B is composition, where A is the class "all" and B is the class "part". Given a third class C, can there be another composition between B and C, so that in this new re...
asked by 11.01.2016 / 21:40
1
answer

How to retrieve values from EditText created via script?

I have the following code that creates 4 EditText in Layout: LinearLayout myLayout = (LinearLayout) findViewById(R.id.formulario); ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.La...
asked by 11.01.2016 / 04:24
2
answers

Problems removing element @ManyToMany with @JoinTable

I'm having problems deleting a @ManyToMany relationship in JPA. In short, I have 3 tables: USER, PERMISSION, and USER_PERMISSION that is the relationship of the previous ones, the relationship is N to N. The problem is that I'm not sure how to r...
asked by 10.01.2016 / 04:40
2
answers

Caused by: java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which re

When trying to run a report containing a still image on an Amazon Linux server. The exception below appears. Has anyone ever been through this? Caused by: java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed...
asked by 08.01.2016 / 01:02
2
answers

Do I need to do unit tests of system entities?

I'm working on a project and I join a team, we were given the task of doing a series of tests with a system, testes de integração continua , testes unitários .... The point is that all systems have classes of entities and rules of...
asked by 21.08.2016 / 22:01