Witam. Mam taki problem. Podczas kompilacji programu w eclipse mars wyrzuca taki komunikat:
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
at client.Exploit.<clinit>(Exploit.java:10)
A oto kod źródłowy:
package client;
import java.io.*;
import java.net.*;
public class Exploit {
public static Socket sock = null;
public static String ip = new String("212.191.0.26");
public static int port = 80;
static String BUFFER;
static OutputStream out = null;
static byte BUFF[] = BUFFER.getBytes();
public static void main(String[] args) throws IOException {
sock = new Socket(ip, port);
BUFFER = new String("A *1800");
BUFFER += new String("xabzxc");
out.write(BUFF);
out.flush();
out.close();
sock.close();
}
}
Z góry dzięki za pomoc :-).