Questions tagged as 'java'

3
answers

Java - renameTo

I put the code first and then explain the problem. I can not find what is wrong. String nuevoNombre = archivo.getParentFile() + "\proc_" + archivo.getName(); File newfileName = new File(nuevoNombre); return archivoProcesado.renameTo(newfileN...
asked by 09.06.2017 / 14:00
2
answers

You can not see the HINT of an EditText on android

Good! I have an app in android studio and I can not make the HINT (default text) to be seen in the application when I run it ... it looks in android studio but in the app it does not ... EditText XML Code: <EditText android:inputType...
asked by 05.06.2017 / 04:27
2
answers

Java Correlative Code

I would like to know how to generate a correlative code with this format "30200-01" the number 30200 is a code that is already established in the database, the number 01 is a number that each time you generate a document increases, " 30200-01 ""...
asked by 11.11.2016 / 17:37
2
answers

How to insert more than 100 thousand records in a table?

I have a ResultSet which brings more than 100 thousand data in total to be inserted, the problem is that my method inserts value by value in the query since there are fields that are empty, the method is as follows, only It's a portion: try...
asked by 18.11.2016 / 17:29
2
answers

In which cases to use application server in Java [closed]

What functionality does a Java application server offer, such as JBoss, in front of a Web server such as Tomcat? What should I take into account when choosing one option over the other?     
asked by 20.03.2017 / 14:12
3
answers

Go from .java to Binary

I have the following class: public class Employees implements Serializable{ private final ArrayList<Employee> llistaEmployees = new ArrayList<>(); /** * Obte la llista d'llistaEmployees que conte la carpeta * @r...
asked by 01.03.2017 / 20:14
2
answers

Have an onClick of a deactivated item

I have a textview off. campoTv.setEnabled(false); and I am looking to send a message (toast or similar) with a message saying that it is disabled ... when you click on it. But when I use setEnabled(false) I can not access my...
asked by 06.03.2017 / 20:25
3
answers

Show query by current date

I would like to show a query for the current date, because when I save in my table I have the field fecha and it is type date . The format to show and save the date is this: void cargar() { Calendar cal = new GregorianCale...
asked by 27.02.2017 / 05:26
1
answer

Null pointer access when using a variable type String [] within a try-catch

Error I receive:    Null pointer access: The variable listUsers can only be null at   this location Variable type String []: String [] listadoUsuarios = null; Code: public void mostrarUsuariosExistentes() { sSQL = "SELECT...
asked by 29.11.2016 / 05:19
2
answers

Activities on android [closed]

I have doubts about the life cycle of an activity. It is not very clear to me what should be done in what method. It is assumed that in onCreate I simply declare the views and the elements it contains and in onStart and onResume...
asked by 26.11.2016 / 07:46