Questions tagged as 'java'

0
answers

TripleDESCryptoServiceProvider C # to Java

I have this code in C # and look for the equivalence of the class TripleDESCryptoServiceProvider for Java public String Cifrar(String cadena) byte[] llave; byte[] arreglo = UTF8Encoding.UTF8.GetBytes(cadena); TripleDESCryptoServiceProvider tr...
asked by 09.05.2018 / 14:40
1
answer

Tomcat 8.5.31 with Netbeans 8.2: Error

I have a project in Java and I change the contenedor de Servlet Glassfish per Tomcat . The problem is that Tomcat does not work, it throws the following error:    Starting Tomcat process ... Waiting for To...
asked by 09.05.2018 / 14:50
1
answer

how to save in a variable the result of executing an ssh command in java with jsch?

I was recently finding out how to execute ssh commands in java programs, and I came across a post recommended by the jsch library. The method that I found was the following: import java.util.Properties; import com.jcraft.jsch.ChannelExec; imp...
asked by 09.05.2018 / 15:49
0
answers

Primefaces button ajax false

I have a button on primefaces: <p:commandButton value="Exportar fichero" action="#{exportarView.exporta}" ajax="false"> The method builds an excel and returns it, all this works well, the problem I have when doing a validation and no...
asked by 09.05.2018 / 16:04
0
answers

Do not save the selected email accountManager

How can I get the accountAuthenticator to save me the email that I indicated with the one I want to log in to the app? This in my authenticator and service: public class AccountAuthenticatorService extends Service { private static final St...
asked by 08.05.2018 / 08:38
1
answer

how to validate a jtextfield from mvc that enter only numbers

An example of this is the validation that a textfield, its length is equal to 4 but, how would you do so that when entering you are only numbers and only letters? public void keyTyped(KeyEvent e) { if(e.getSource().equals(t.getTxtdesc()))...
asked by 08.05.2018 / 04:28
0
answers

RadioButtonID of AlertDialog null using restore preferences

I have a radiogroup built in an alertDialog. The problem is that it gives me different id to reconstruct the activity when I call the preferences file to restore the option that the user set. findViewById(R.id._signupEridelevel).setOnClickList...
asked by 09.05.2018 / 00:57
0
answers

How to use JInternalFrame in an enum?

I want to organize the forms of my system, create a enum where I add all the data of each form (title, Querys, Name of the table, etc). It worked great until you try to put the JInternalFrame to which it belongs. What I want to do is have a pr...
asked by 07.05.2018 / 19:54
2
answers

ERROR "class ... does not have a main method

I have a small problem with this error ... at the moment of throwing it indicates to me that I do not have a method ... which if I have, the truth is that I do not find the error, I need your help I leave the code for you if you can help me pa...
asked by 07.05.2018 / 18:38
0
answers

Check 2 consecutive ascii watches

X = led on = no led / led off .XX...XX.....XX...XX. ...X....X...X....X..X ...X....X.X.X....X..X .XX...XX.....XX...XX. X.......X.X....X....X X.......X......X....X .XX...XX.....XX...XX. <- 23:59 ......
asked by 14.05.2018 / 03:29