Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AccessControlException when opening URL connection in Applet  RSS feed

A Flatoff
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have an Applet - I believe it is signed ( I used keytool and jarsigner to sign it)

The purpose of the Applet is to load Images from a remote server via http.

I am getting an AccessControlException when I try do do a URL.openConnection()

This code works fine if the URL that I'm opening up is on the same server as the web-server hosting my Applet. But if the URL I'm opening is on a different web server I get the exception.

Below is the snippet of code that fails and the java stack trace.

This applet is a modified sample Applet for viewing images from IBM Content Manager similar to the eClient Applet viewer. I only mention it so people doing searches in the future might find this thread. If you haven't heard of Content Manager that's ok - this is a straight up Java question.

Can someone familiar with Applet security lend a hand and help me figure out what I have to do?

If needed, I could change the client policy files so the people's JREs can view the images. I just need some direction on how to do it.

Thanks in advance!

Output in JRE Console:

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!