ERROR:java.security.AccessControlException in Applet!

Fabian Lopez Coloma <faloco-r6bP6fM/4OjA/jP0kzA/[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hello ,
I have programmed a client-server applcation. I use an applet that opens a
socket. It works when I test it in my computer but not when I execute the
server on TINY. It is amazing! I programmed a client that send a string through
the socket using comand line, and after that, I used that code to create the
applet and send the same string. Both clients work with the client in my
computer, but when I execute the server in tini, only the command line program
works, not the applet!!! It has the following error:

java.security.AccessControlException: access denied (java.net.SocketPermission
143.167.116.182:4443 connect,resolve)

The applet creats a cliente object:
c=new cliente("eo"); // eo is the string that you send

And the client class is:

import java.io.*;
import java.net.*;

public class cliente  {
    //public static void main(String[] args) throws IOException {


	public cliente(String com) throws IOException{
	
        Socket echoSocket = null;
        PrintWriter out = null;
        BufferedReader in = null;
	
	System.out.println("2");
	

        try {
            echoSocket = new Socket("143.167.116.182",4443);

		InetAddress ip=echoSocket.getLocalAddress();
		System.out.println(ip);


            out = new PrintWriter(echoSocket.getOutputStream(), true);
            in = new BufferedReader(new
InputStreamReader(echoSocket.getInputStream()));
        } catch (UnknownHostException e) {
            System.err.println("Don't know about host: TINI.");
            System.exit(1);
			}
         catch (IOException e) {
            System.err.println("Couldn't get I/O for " + "the connection to:
TINI.");
            System.exit(1);
         }
	
	    out.println(com);
	    System.out.println("Respuesta desde el server: " + in.readLine());
	

	out.close();
	in.close();
//	stdIn.close();
	echoSocket.close();
       }
	}
	
	//} del main

-------------

I don't know where  the problem is!! It is very extrange! Can anyone help me?
 

_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.