If I work in eclipse the problem does not occur, but if I create the jar and try to run it I get this error. Why?
this is where I get this error:
try {
SecretKeySpec key = new SecretKeySpec(KEY.getBytes(), CriptAlgorithm);
Cipher cipher = Cipher.getInstance(CriptAlgorithm);
if (op.equals("C")) {
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] enc = cipher.doFinal(val.getBytes("UTF8"));
enc = BASE64EncoderStream.encode(enc);
return new String(enc);
}else {
cipher.init(Cipher.DECRYPT_MODE, key);
byte[] dec = BASE64DecoderStream.decode(val.getBytes());
byte[] utf8 = cipher.doFinal(dec);
return new String (utf8,"UTF8");
}
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
EDIT: In eclipse when I create the jar I have this options. I tried all three options but the problem persists
this is the java class: com.sun.xml.internal.messaging.saaj.packaging.mime.util.BASE64EncoderStream
I don't understand why I have this error, the class is not external