Questions tagged as 'java'

1
answer

How to find specific values in a String?

I have to get the Ethernet + IPV4 adapter from Windows, so everything is quiet. I ran the process and stored everything in a String Buffer and sent it back: public String IP (String tarefa) { StringBuffer buffer = new StringBuff...
asked by 24.08.2015 / 13:36
1
answer

Product displayed is the smallest within the group (Criteria)

I have a function in the system that I'm developing that returns a batch list where the batch quantity is greater than zero, searching for the product name (foreign key). Until that point I have. When doing the search it returns me all lots of t...
asked by 18.03.2016 / 00:35
1
answer

Create generic type in ArrayList to persist data

I'm having difficulty understanding the concept of Dao and how I could create a specific type to store my data, I'm initially using an ArrayList of Strings and need to adapt it to an ArrayList of Object Product, which would have, for example cod...
asked by 16.03.2016 / 13:01
1
answer

Is it possible to load classes dynamically and use them as type?

I'm trying to make a code that loads classes dynamically and can use them to instantiate and be used to cast. I can create an instance in the newly loaded class using the minhaclasse.newInstance() method, but I can not use the newly loade...
asked by 01.04.2016 / 15:49
1
answer

Vector and Classes, sorting and populating vector in Java

I'm doing an exercise that you need to create a vector of 10 names, and you have 3 methods. The first method is called registerName , and has the function to fill in the vectors, the second method is called sortName that returns a String (whi...
asked by 27.11.2015 / 04:24
1
answer

For an unordered set of Listeners what is the best java.util.Set implementation to use?

I'm developing a Handle for a stream of data, where events will be periodically released that should be captured by a small set of Listeners from 1 to 5 listeners . This set of listeners does not need to be triggere...
asked by 11.08.2015 / 01:50
1
answer

Incorrect information when loading bigdecimal entity

I have a table, that one of its columns is a numeric (25,10) that will be shown rates. But there are records that will be reset (0.0000000000) In my entity you have ownership of this fee, such as a BigDecimal . But when hibernate populat...
asked by 04.08.2015 / 22:28
1
answer

PreparedStatement select with like 'something%' in Java Swing

How to perform LIKE 'c%' search with PreparedStatement ? I have the following code: PreparedStatement pstm; ResultSet rs; public void pesquisarAdministrador(){ String sql = "SELECT administrador.idadministrador, administrado...
asked by 19.06.2015 / 18:20
1
answer

How to open a JSP inside a JSP through a Servlet?

I'm using a Script, but I'm not using Servlet to do the desired action inside my index.jsp page, and do not use this Script below to open a JSP file inside my index.jsp home page. <script src="//ajax.googleapis.com/aj...
asked by 21.06.2015 / 16:54
2
answers

How do I connect a database in a JAVA application

I have a Java application and a MySQL database connected to this application on my machine. The application will be distributed to other machines on the same network, but I can not make the banco de dados connection to other...
asked by 03.06.2015 / 16:39