Questions tagged as 'java'

1
answer

Problem Connecting Oracle DB in Java

I could not connect to a BD of Oracle , it tells me that it does not recognize the SID the listener, I would appreciate a lot if you could guide me, my code is as follows: import java.sql.Connection; Class.forName ("oracle.jdbc....
asked by 06.09.2018 / 18:55
1
answer

Attach PDF file to android email API 24

I'm very new to this, it turns out that I have an app that will send me all my data and an attachment to send it by email, but when I update my mobile to android 8 I do not have the file attached, I've put a conditional depending on the API but...
asked by 30.08.2018 / 09:13
1
answer

Edit a cell Google Sheet API

Again I come with a problem with the Google Sheet API: For this case, I have a spreadsheet or Spreadsheet and I want to modify / edit one of its cells. The request would look like this: {updateCells={ fields=*, range={ endC...
asked by 04.09.2018 / 18:25
0
answers

Take data from a dataForm sent by ajax, in a servlet

I am sending a file and a parameter through ajax through a dataForm, but I can not get that data in the servlet, nor using the request for the parameter that is a text. So I send the data through ajax var modulo = "subirArchivo"; var a...
asked by 27.08.2018 / 20:28
0
answers

super polygon class, sub classes triangle type

Create an object of the polygon super class with default data and show the default data Create an object of the polygon super class with data entered by the user Show the static variable of the Polygon class through a static method Create an obj...
asked by 14.09.2018 / 18:33
1
answer

How to make the difference in hours of two dates in android

Hello, what happens is that I need to make the difference between two data, for example: String fecha_entra ="2018/09/13 10:14:00" String fecha_sale ="2018/09/14 01:10:20" and in a third variable the result in hours. I know that these data...
asked by 14.09.2018 / 19:31
1
answer

Generic class in Java

I have the next class, but now we want it to be generic. The first thing we did was to call the @param <E> and extend the comparable class, in order to use compareTo but we did not know how to change the code: /* * To...
asked by 14.09.2018 / 18:53
0
answers

List printers on the client side (Java)

I have an application running on the server and I want to be able to detect the printers that are accessible from an xs computer. That is, on the client side I want the printers to be listed and now, as the application is running from a serve...
asked by 14.09.2018 / 18:09
0
answers

how do I get the name of a file type part

I send a file from a jsp to a servlet where I receive it in a getPart but I can not even get the name of it. So I am taking the file, but it results in null, and I already made a verification and if I am receiving the file. Part archivo = req...
asked by 28.08.2018 / 14:51
1
answer

java Swing, How to add a jcombobox to a jpanel by setting the grid bag distribution by code?

The idea would be that when I add the combo I also configure the regilla bag distribution giving the weight of x in 1 and the dey in 0 in the distribution of the Jpanel. //El código sería el siguiente JComboBox cmbNomDocumentoJEP = new JCombo...
asked by 28.08.2018 / 13:21