Java NullPointer Exception in Server chat program
Hi i am having problem with my java chat. when i go to load it i get a NullPointerException i know what code is causeing the problem but im not quite sure what it does can u explain to me please. Ive been looking at this error trying to fix it for a few weeks now and its annoying. Thank you for any help. Here is the code that causes the NullPointerException
Code :
public static final void j()
{
try
{
String as[] = {
"ar", "aq", "ao"
};
Class class1;
Object obj = (class1 = Class.forName((new StringBuilder()).append(com/diginet/oldchat/server/g.getPackage().getName()).append(".an").toString())).getMethod(as[0], new Class[0]);
if(q)
{
obj = ((Method) (obj)).invoke(null, new Object[0]);
Class aclass[];
(aclass = new Class[1])[0] = java/lang/String;
Object aobj[];
(aobj = new Object[1])[0] = obj;
for(int i1 = 1; i1 < as.length; i1++)
{
Method method;
(method = class1.getMethod(as[i1], aclass)).invoke(null, aobj);
}
q = false;
}
return;
}
catch(Exception _ex)
{
ChatServer.q_java_util_Vector_static_fld = new Vector();
}
ChatServer.q_com_diginet_digichat_common_SerialInfo_static_fld = null;
}
If part of the program uses
Code :
com.diginet.oldchat.server.g.j();
wich will load the code above it always gives NullPointerException and then wont continue loading what is wrong? Please help me
Oh and by the way this is my first post on this forum and i found it quite easy to use! :D
Re: Java Server Chat, Help Needed PLEASE!! - NullPointerException
Sorry but I have no idea what is causing this exception :(
I am looking at the code within the other thread too but this doesn't help me either!