Questions tagged as 'java'

3
answers

Spring component annotations

I'm starting to use and, so I've seen, the difference between the annotations @Controller , @Repository and @Service is the layer where you have to use it since it could be said that they are an extension / specialization of...
asked by 23.11.2016 / 15:29
2
answers

Pass data from activity to fragments [closed]

I am trying to pass a data from a Activity to a Fragment , this must happen when I press a button. I tried with Bundle or directly with get and it happens to me is a predefined data, but when editing the text field and joinin...
asked by 07.05.2017 / 00:01
2
answers

I can not update a field in a Java-Web form

At the moment I want to modify a field in the form of a record, in the case of the Age field, I modify it to 19 but at the time of modifying it I get the following error: GRAVE: Servlet.service() para servlet MisServlets.ServletPaciente lanzó...
asked by 23.11.2016 / 15:11
3
answers

Is it possible to know the number of records in a ResultSet? Java

I have a small concern about ResultSet in Java, my question is Can we know the number of records they have at the time of completing a query? I want to get this information to be able to perform an action with this amount of records...
asked by 15.06.2017 / 19:45
2
answers

The data is not deleted from the database

I can not get my Java application to delete data from a database. I attach code to my method to erase: int rowIndex = this.tabla.getSelectedRow(); try{ String dni = String.valueOf( tabla.getValueAt(rowIndex, 0)); st = con...
asked by 02.06.2017 / 09:07
1
answer

Export executable jar

I am creating a project that has a database (in Access 2016), the problem is that I do not know how to export the database with the executable jar, if it could be done, should I change the path of the base in the code? This is my class' packag...
asked by 21.10.2016 / 23:30
2
answers

How to show in JOptionPane, a tribute of an enum

I'm using enums and JOptioPane, and I want to show the enum attribute, (I mean a string), this is what I have: public Cities readCityOrigen() { Cities [] listCityOrigen = Cities.values(); Cities city = (Cities) JOptionPane.showInputDia...
asked by 22.10.2016 / 01:55
2
answers

I have several dropdown with the same ID in the xpath (SELENIUM)

What should I do if I have 2 dropdown, for example, but the name on the xpath is the same? How can I do to identify them? There is no name and the ids are the same. The code for both is this: <input id="dropdown-input" c...
asked by 13.12.2016 / 20:02
2
answers

List a directory in Java using sockets (client / server)

I am starting to use sockets in Java and it seems that I still do not fully understand them. I am trying to create a server that waits in a port for a client to connect to it and that when the client connects, it sends a list of a directory....
asked by 09.12.2016 / 20:03
1
answer

Delete query Java & Mysql

I am trying to remove a record from the database with the book code I pick up from a combo and from all its associated data tables using PrepareStatement but it is throwing me an error. I pass the code to you because surely it is not doin...
asked by 26.11.2016 / 00:33