Questions tagged as 'java'

2
answers

List directory and subdirectory files with listFiles

Today I'm ready through the code below the files that are in the directory passed by the parameter, however now I would like to also list the files that are in the subdirectories. I did some searches but I did not find anything that did not chan...
asked by 11.06.2014 / 16:00
1
answer

Search method involving Java and SQL Server

How to do a search in java passing an attribute of the (SQL) as parameter? I decided to type an outline of the cod: MAIN static private void PesquisarUsuario(Connection con) throws SQLException { int cpf; Scanner s = new Scanne...
asked by 15.05.2014 / 03:28
3
answers

How to pass value from editText to attribute to type int on Android?

I have a question regarding the storage of value from EditText to attributes of type int of a class. For attributes of type String I do this: objEquipamento.setMarcaModelo(edtMarcaModelo.getText().toString()); But when...
asked by 31.05.2014 / 23:33
1
answer

How do getHeight () not return 0 before the Draw method?

I have a problem where I need to make a ball appear in the middle of the getHeight () / 2 screen, the real problem is in the init () function where the value of getHeight () return me 0, which should return me the height value of the scree...
asked by 25.05.2014 / 22:20
1
answer

Open word file through .jar

I have a .jar calculator that works perfectly! My doubts are: In the menu I have the "Source Code" button and I would like, when clicking, to open a Word document with the source code of the program. I managed to accomplish this task but only on...
asked by 15.05.2014 / 19:40
1
answer

How to define a string coming from an sqlite database to display in a TextView?

I'm trying to display a string value in a textview through a query in sqlite, but when I run the code it displays a numeric log of the sqlite class of Android randomly. I'm just trying to display the string as the field value in the textview....
asked by 25.10.2018 / 17:27
1
answer

Catch all the classes of a given Package that is in the classpath

I'm trying to get all the classes of a particular package, I've seen some code that does this, however, it just takes the classes that are part of the project itself, basically does not use reflection and yes it does a search for .class...
asked by 12.02.2014 / 16:02
1
answer

Close jar programmatically

I currently have a (main) JAVA program, which calls it another JAVA program (child) ... this is Ok .. however when I close the main program, I also close the child program. I've tried: Runtime.getRuntime().exec("taskkill /F /PID **NOMEDOPRO...
asked by 13.02.2014 / 18:40
1
answer

Foreach with Lambda does not work

I have a list of objects that I want to go through, but it is giving error and I am not understanding why: listaAtendimento.stream().forEach(atendimentoFicha -> { fichaAtend.getAtendimentosIndividuais().add(getAtendIndivC...
asked by 12.11.2015 / 11:32
1
answer

Regular Expression

I have an application that reads a string and needs to detect parameters contained in the string. The parameter has the following pattern <<<.texto>>> ( < and > are part of the parameter). I was ab...
asked by 12.11.2015 / 19:32