Win a copy of Spark in Action this week in the Open Source Projects forum!

Rajendar Gurrala

+ Follow
since Oct 31, 2014
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rajendar Gurrala

It was working fine with JDK 1.7 or earlier versions, but once we test with JDK 8 we are getting the following exception

Exception in thread "cth" access denied ("" "IP:PORT" "connect,resolve")
at Source)
at Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source)
at Source)
at iyp.simplegameapplet.d.f.a(Unknown Source)
at iyp.b.a.b$ Source)

We have an applet, which will open a socket connection to communicate with the server socket application here is the applet code which used to open the socket communication

Socket sock = new Socket();
InputStream is;
OutputStream os;
try {
sock.connect(serverAddr, timeoutMs);
} catch(SocketTimeoutException ex) {
return false;
is = sock.getInputStream();
os = sock.getOutputStream();

We are using signed applets, I tested with a java client program from eclipse, this works fine, only with Applet we have issue. may be Applet security need to use full permissions we try with MANIFEST.MF with Permissions: all-permissions and object parameters for applet which doesn't solve the problem.

When we grant in the client machine java.policy to full permissions it was worked fine, but this is not correct way to go ahead forcing to change client machine java.policy.

any help will be appreciated..
5 years ago