Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Signed Applet Works In Brower Not In Debugger

Posts: 5
  • Mark post as helpful
  • send pies
  • 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
  • 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.

Their achilles heel is the noogie! Give them noogies tiny ad!
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic