This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

how to use policy tool for Applets in java ?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm connecting to the database from Applets. it gives an RuntimeException stating that accessClassPackage.sun.jdbc.odbc
access denied.so i've created a policy file by giving RuntimePermission & in the target for accessClassPackage i've given sun.jdbc.odbc but still it's giving the same Exception. Can anybody reply me ?
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you get the solution?? I also got the same problem and i have to solve it as soon as possible.
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
you dont need to use a policy file at all. applet can access a database without being signed.
My applet can access an oracle database from a remote machine. I have just added the "oracle" package in the same folder that contains the applet classes.
Regards,
MAC.
 
Saloon Keeper
Posts: 22254
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... "I have just added the "oracle" package in the same folder that contains the applet classes."
Are you running the applet in a browse or just the applet viewer? You can get away with murder in the applet viewer.
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim, I am running the applet on the browser, but whats the difference?
Regards,
mac.
 
    Bookmark Topic Watch Topic
  • New Topic