Jump to content

JAVA PROBLEM


ashishrathore

Recommended Posts

hello,i am running the Chat Applet and i am getting some runtime errorscan u help me in that(if possible)i had changed the chatfilename according to me and everything is set up-di am getting an error like this===================ERROR================================java.security.AccessControlException: access denied(java.net.SocketPermission [file:/C:/New%20Folder/dibella/Chat.java]resolve)========================================================some part of code i am giving...=====================CODE=============================public void run(){app.showStatus("sending");try{chatServer = new URL("http",app.getDocumentBase().toString(),cgiPath+"chat.cgi");chatServerConnection = chatServer.openConnection();chatServerConnection.setDoOutput(true);chatServerConnection.setDoInput(true);chatServerConnection.setUseCaches(false);chatServerConnection.setRequestProperty("Content-type","application/octet-stream");chatServerConnection.setRequestProperty("Content-length",""+completeMessage.length());DataOutputStream send = new DataOutputStream(chatServerConnection.getOutputStream());send.writeBytes(completeMessage);send.flush();send.close();app.showStatus("Sent");DataInputStream in = new DataInputStream(chatServerConnection.getInputStream());String reply;while((reply=in.readLine())!=null){System.out.println(reply);}in.close();}catch(Exception e){app.showStatus("Error sending chat");System.out.println(e.toString());}}======================================================can u help me out???thanx 4 reading...-ashish

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...