Questions tagged as 'java'

2
answers

Error connecting to JDBC with local sql Server

I try to connect the java with the Sql Server from my local machine but I get this error com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1434 has failed. Error: Connection refused: connect. Pl...
asked by 28.07.2014 / 17:23
1
answer

Send button message [closed]

I wanted to ask how can I send a one-button message or the message is written to this button     
asked by 16.11.2017 / 16:54
1
answer

Access toString method from generic class [closed]

I have a generic Employee class and 3 other specific classes that inherit from Employee. Within the Employee class, I have the toString method. abstract class Funcionario { private String nome; private String documento; public...
asked by 31.10.2018 / 21:09
1
answer

SIMULATE CLICK ON A href via SELENIUM WEBDRIVER

I'm running a TABLE in the last column I have a link that opens an alert, but I can not simulate the click with Selenium, can anyone help me? td class="aligncenter"> a href="javascript:void(0);" title="Visualizar Texto" onclick="BuscarText...
asked by 06.12.2018 / 13:07
2
answers

HttpClient throwing exception org.hibernate.exception.GenericJDBCException?

Is there any reason for the following code to throw this exception? I have a webservice that queries my bank and transforms everything into xml and then sends to another webservice gets the answer and updates my database, everyth...
asked by 14.03.2014 / 17:45
1
answer

Record with Tabs

I am doing a registration and I chose to do it using Tabs because it is extensive (many fields) and involves photos, so I can put the information organized, it is the order of service registration, however I noticed that Tabs is 99 % to present...
asked by 20.09.2017 / 00:08
0
answers

How to sort a random position in an array?

I have an array of random size filled with random numbers (between 0 and 3). I need to sort a position inside it and from that position, pick up the numbers "above" and "below" from the selected position and save it to another array, making a co...
asked by 21.12.2018 / 11:53
0
answers

Error adding to JAVA [duplicate]

I would like to know how to add hours in Java. For example: 10:30 + 00:30 = 11:00. Does anyone know how? Code sample: package teste1; import java.io.UnsupportedEncodingException; import java.io.ObjectInputStream.GetField; import java....
asked by 21.12.2018 / 17:18
1
answer

How to apply unit tests when the main class is an interface?

I have this method in my Beginning class @Override public void question() { String question = String.format(TEXT_OF_A_QUESTION, this.namePlate); int answer = JOptionPane.showConfirmDialog(null, question, "Question", JOptionPane.YES_NO_...
asked by 26.12.2018 / 22:03
2
answers

Redirect Java Script or HTML [closed]

I'd like to be doing the same redirection based on the user's location. Do you have this possibility? ex: If he is in Brazil he stays in the site. if it is from another country it is automatically redirected to another site. Thank you    ...
asked by 06.11.2018 / 19:02