Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Signed Applet Works In Brower Not In Debugger

Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get the following error when I try and degbug my applet from the netbeans IDE 6.1.

Error: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)

The above error is created when the following code is executed:

try {

I have signed the applet and it will work fine in a webbrowser launced from html. I am not sure why the applet
gives me this problem from the debugger.

I really need to be able to debug the code. Any ideas ?

Dominic Siano
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was able to get the debugger to work with the following policy file:

grant {
permission java.lang.RuntimePermission "accessClassInPackage.sun.jdbc.odbc";
permission java.util.PropertyPermission "file.encoding", "read";

In the Netbeans debugger I added the following line to the VM options Run Catagory:\KnowledgeRepository\build\classes\applet.policy

I guess this was good enough to get me debugging my code, but if someone can provide input
as to why the applet will work after it has been signed and run from a browser but not in the netbeans debugger ?

One thing I forgot to mention in my last post was the following; after I compile and create the jar
I sign it and copy it into the directory where the applet if running from in the debugger. If I create
the html doc here and run from the browser all is good. In the debugger it will not work unless I
have the policy file. There seems to be an issue with the appletviewer in netbeans. The same project
debugs fine on another mach without any policy file.

It runs on an internal combustion engine. This ad does not:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic