else if(Utils.isAtleastJava(5))
{
String[] m = mechanisms.getMechanisms().toArray(
new String[mechanisms.getMechanisms().size()]);
try {
SaslClient sc = new SaslClient(javax.security.sasl.Sasl.createSaslClient(m
, null, "xmpp", loginInfo.getServer(), null,this));
byte[] response = (sc.hasInitialResponse()
? sc.evaluateChallenge(new byte[0]) : null);
String res = null;
System.out.println("res made");
if(response!=null)res =Base64.encodeBytes(response);
saslClient = sc;
System.out.println("ready to send");
connect.sendWhileConnecting(new SaslPacket(sc.getMechanismName(),res));
System.out.println("auth packet send");
}catch(Exception e)
{
e.printStackTrace();
connect.sendLoginError(e.getMessage());