Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

do applet need to signed, In chat applet

 
Bill fake
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
i am making a chat applet. will the applet works without dealing with the security permission or should i sign applet. to work in the browser offline even?
please can you make this in applet?? i have tried but it didn't come. it's saying classCasteException.
help me with the code , please. \i will remain grateful.
//client side programme.
import java.net.*;
import java.io.*;
public class client
{
Socket client;

BufferedReader keyin;
BufferedReader in;
PrintWriter out;
String keyinput;
String msg;

public client()
{

try
{

client=new Socket("127.0.0.1",8080);
keyin=new BufferedReader(new InputStreamReader(System.in));

in=new BufferedReader(new InputStreamReader(client.getInputStream()));
out=new PrintWriter(client.getOutputStream(),true);

while(true)
{
try
{
keyinput=keyin.readLine();

out.println(keyinput);

msg=in.readLine();
System.out.println(msg);
}
catch(Exception e)
{
System.out.println("error: "+e.getMessage());
}
}
}
catch(Exception e)
{
System.out.println("error :"+e.getMessage());
}
}
public static void main(String args[])
{
client vclient=new client();
}
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic