|
-
Unable to connent to server in my simple Client/server Tic Tac Toe
public void actionPerformed(ActionEvent event)
{
try {
connection = new Socket(
InetAddress.getByName(event.getActionCommand()), 5000 );
input = new DataInputStream(
connection.getInputStream() );
output = new DataOutputStream(
connection.getOutputStream() );
}
catch ( IOException e ) {
e.printStackTrace();
}
outputThread = new Thread( this );
outputThread.start();
id.setEditable( false );
}
Hi, above is a part of my client source. Briefly, the client interface will
appear a textfied for user to key in IP, once he/she done, this method will
make a connection to the server by caputuring the client input.
There is no problem if I run both client and server application on a same
pc. If I run it on separate PC, the client is not able to connect to the
server. These are the message thrown:
Exception occurred during event dispathcing: java.security.AccessControlException:
access denied <java.net.SocketPersmission 10.100.1.98:5000 connect, resolve>
at java.security.AccessController.checkPermission<AccessController.java:399>
at......
This is my problem, and I am wondering why it can run on the same PC but
not for separate one. Thanks to clear my doubt.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks