B
BuggyMonkey
Gast
Hallo,
erstmal danke das ihr meinem Problem zeit spendet!!
ich bin völlig neu in der applet entwicklung, habe vorher schon ein bisschen Anwendungsentwicklung(Basic) und PHP gemacht...
Ich wollte mich jetzt mal der Applet entwicklung mit Java witmen.
Ich habe im Internet ein ziehmlich gutes(denke ich) Tutorial für ein Chat gefunen java.seite.net/chat/start.html
ich habe mal versucht den server quellcode zu compilieren, leider bekomme ich immer folgende fehler:
Hier mal der Quellcode:
ich verstehe diese fehler leider nicht... ich fänd das sehr net, wenn mir die Übersetzten könnte
Ganz lieben dollen dank ich Vorraus!
Gruß Nils
erstmal danke das ihr meinem Problem zeit spendet!!
ich bin völlig neu in der applet entwicklung, habe vorher schon ein bisschen Anwendungsentwicklung(Basic) und PHP gemacht...
Ich wollte mich jetzt mal der Applet entwicklung mit Java witmen.
Ich habe im Internet ein ziehmlich gutes(denke ich) Tutorial für ein Chat gefunen java.seite.net/chat/start.html
ich habe mal versucht den server quellcode zu compilieren, leider bekomme ich immer folgende fehler:
Code:
C:\Homepages\java-applet\chatserver.java:37: cannot find symbol
symbol : class connection
location: class chatserver
connection c = new connection(this, client);
^
C:\Homepages\java-applet\chatserver.java:37: cannot find symbol
symbol : class connection
location: class chatserver
connection c = new connection(this, client);
^
C:\Homepages\java-applet\chatserver.java:55: cannot find symbol
symbol : class connection
location: class chatserver
connection you;
^
C:\Homepages\java-applet\chatserver.java:59: cannot find symbol
symbol : class connection
location: class chatserver
you = (connection) connections.elementAt(i);
^
4 errors
Hier mal der Quellcode:
Code:
import java.net.*;
import java.io.*;
import java.util.*;
public class chatserver implements Runnable
{
public static final int PORT = 8765;
protected ServerSocket listen;
protected Vector connections;
Thread connect;
public chatserver()
{
try
{
listen = new ServerSocket(PORT);
} catch (IOException e)
{
System.err.println("Fehler beim Erzeugen der Sockets:"+e);
System.exit(1);
}
connections = new Vector();
connect = new Thread(this);
connect.start();
}
public void run()
{
try
{
while(true)
{
Socket client=listen.accept();
connection c = new connection(this, client);
connections.addElement(c);
}
} catch (IOException e)
{
System.err.println("Fehler beim Warten auf Verbindungen:"+e);
System.exit(1);
}
}
public static void main(String[] args)
{
new chatserver();
}
public void broadcast(String msg)
{
int i;
connection you;
for (i=0; i<connections.size(); i++)
{
you = (connection) connections.elementAt(i);
you.out.println(msg);
}
}
}
Ganz lieben dollen dank ich Vorraus!
Gruß Nils