This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reagarding Access on databse and file system from applet in same code base

suman paul
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to access databse and file system from the same codebase thro' applet getting exception.
But form code base its not supposed to do right??
I used access and Jdbc dbc driver.Could you kindly give the code snippet relevant to that.
The applet class and its dependencies as well as
the DAO class all in the tomcat server root dir.
What i did.
Properties prop=new Properties();
prop.put("",new File("MyPolicy.policy"));
grant {
permission "developer",
permission java.lang.RuntimePermission
permission java.util.PropertyPermission
"file.encoding", "read";
It would read the files from "." dir current dir and make hir.
Now the exception
cannot access File.
kindly give these section code and policy file if reqd or alternative way to access file system as well as database.

What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!