Current Position:Home > Java.policy setting

Java.policy setting

Update:11-30Source: network consolidation
I am writing an web based application using applets nadn eed to contact a MYSql database.
I am getting Access Denied exception.
In my java.policy file I added the following two lines :
grant codeBase "http://mywebpage/"{
I am still getting the following exception : Any help will be greatly appreciated since I have a demo tomorrow. (Is there anyway to confugure the java.policy or file to allow the jar that contains my applet(dvt.jar) to access the underlying database.)
Is there some place I need to specify explicitly where to find this java.policy file.
Platform is UNIX.
Unable to connect to any hosts due to exception: access denied ( connect,resolve)** BEGIN NESTED EXCEPTION ** access denied ( connect,resolve) access denied ( connect,resolve)at Source)at Source)at java.lang.SecurityManager.checkPermission(Unknown Source)at java.lang.SecurityManager.checkConnect(Unknown Source)at Source)at Source)at<init>(Unknown Source)at<init>(Unknown Source)at com.mysql.jdbc.StandardSocketFactory.connect( com.mysql.jdbc.MysqlIO.<init>( com.mysql.jdbc.Connection.createNewIO( com.mysql.jdbc.Connection.<init>( com.mysql.jdbc.NonRegisteringDriver.connect( java.sql.DriverManager.getConnection(Unknown Source)at java.sql.DriverManager.getConnection(Unknown Source)at vdt.VdtModuleApplet.getConnection( vdt.VdtModuleApplet.init( Source)at Source)** END NESTED EXCEPTION ** System = Inited, gotParameters, init propertiesGetting Connection Posts: 30 | Registered: Feb 2005 | IP: Logged

The Best Answer

Hi Folks, I am also facing the same kind of
problem...when I am trying to open notepad by
clicking on New option of my Frame's menu.. I am
getting the message Access Denied...some permission
problem is there...Please help me in directing about
setting the policies...
  • How can I change java.policy at runtim on client machines using java webst? Update:10-11

    Hi, I have to change java.policy to launch my application through webstart to provide one RuntimePermission "permission java.lang.RuntimePermission "getClassLoader";" Its because of a bug in java bug "_

  • How to handle the java.policy file ? Update:10-11

    Can somebody tell me how to handle the java.policy file? I always get and while connecting to an appserver from an applet. What do I have to write in the java.policy file, where do I hav

  • File Access with unsigned Applet through editing the java.policy file Update:10-11

    I'am starting to lose my hair on this... I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of th

  • How add grant permission in java.policy Update:10-11

    hi master sir serch in my system C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\lib\security C:\Program Files\j2sdk_nb\_jvm\lib\security C:\Program Files\Java\j2re1.4.1_03\lib\security C:\Program Files\Java\jre1.5.0_10\lib\security sir i have many java.pol

  • ClassLoader & java.policy Update:10-11

    Hi , I am facing problem with the following code. ClassLoader loaderPrev = Thread.currentThread().getContextClassLoader(); ClassLoader loader = URLClassLoader.newInstance(new URL[]{new URL(CodeBase)} , loaderPrev ); ClassLoader loader = new URLClassL

  • Java Applets and .java.policy Update:10-11

    Hi. We are developing an applet that need to access to the file systems and anothers properties, like user.home. To do this and don't modify the java.policy of the jre, we create a .java.policy file into user home. The content is: grant { permission

  • Explicitly installin java.policy problem Update:11-30

    is there any one who knows how to explicitly install the java.policy. What i have been doing is set the policy of the RMI server through a file like java.policy which contains this grant { permission "*:1024-65535",&q

  • Can distribution of a .java.policy file be eliminated Update:11-30

    Sorry for the stupid question, but I'm fairly new to the realm of dealing with Java security... I have an applet that I want to deploy worldwide as part of an upgrade to an existing website, but I've run into the following error: "Error getting conne

  • Does Java Plug-in Ignore java.policy Permissions? Update:11-30

    I am running Firefox 3.6.12 on Ubuntu Karmic with Java plug-in 1.6.0_22. I'm trying to run an Aventail OnDemand applet, and I keep getting I/O file-reading permissions exceptions in the Java console. I tried granting the permission in /usr/lib/jvm/ja

  • Java.policy setting Update:11-30

    Hi, I am writing an web based application using applets nadn eed to contact a MYSql database. I am getting Access Denied exception. In my java.policy file I added the following two lines : grant codeBase "http://mywebpage/"{ permission java.secu