RE: openMapApplet and .jar data

From: Wrightson, Barney ( Contractor ) <Barney.Wrightson@dsto.defence.gov.au>
Date: Thu Mar 14 2002 - 00:52:40 EST

I don't actually want to have to alter the policy to use the jar file - I
should be able to open data from the jar without that FilePermission, after
all the code is run from the jar without the FilePermission.

-----Original Message-----
From: PRADEEP RAMACHANDRAN [mailto:arpradeep@lycos.com]
Sent: Thursday, 14 March 2002 3:36 PM
To: 'openmap-users@bbn.com'
Subject: Re: openMapApplet and .jar data

Hello Barney,

Have you tried the "policytool" ?

In case you haven't, you could try launching the tool. The tool would search
in default loactions for the java.policy file, ( if you are running Windows
95/98, this location would be C:\Windows ).

You could also need to edit the policy.url parameters in the java.security
file under the lib\security folder to indicate the locations from where you
would want the policytool to load your policy file.

You could then add policies and then add/edit permissions as part of your
policy. For starters you could set "All Permissions", only that would open
up security on your system. Remember to save the file when you are done ...

After that run the policytool again and make sure that your policy file gets
loaded.

Try running the applet after that ...

Hope this helps.

Regards,
Pradeep.

 --

On Thu, 14 Mar 2002 09:50:21
 Wrightson, Barney ( Contractor ) wrote:
>Hi guys,
> I am trying to get layer data including DTED and Political
>Boundaries working with the data in a .jar file, and have tried changing
the
>com.bbn.openmap.io.BinaryFile.java file to use
>Thread.currentThread().getContextClassLoader().getResource(name); but this
>results in th following error (using JRE Plugin 1.3.1_02, latest apache,
>NT4, Netscape 6.2):
>
>*** ERROR ***
> access denied (java.io.FilePermission \\host.name.com\openmap\data.jar
>read)
>*************
>java.security.AccessControlException: access denied (java.io.FilePermission
>\\host.name.com\openmap\data.jar read)
> at java.security.AccessControlContext.checkPermission(Unknown
>Source)
> at java.security.AccessController.checkPermission(Unknown Source)
> at java.lang.SecurityManager.checkPermission(Unknown Source)
> at java.lang.SecurityManager.checkRead(Unknown Source)
> at java.util.zip.ZipFile.<init>(Unknown Source)
> at java.util.jar.JarFile.<init>(Unknown Source)
> at java.util.jar.JarFile.<init>(Unknown Source)
> at com.bbn.openmap.io.JarInputReader.reopen(JarInputReader.java:73)
> at com.bbn.openmap.io.JarInputReader.<init>(JarInputReader.java:58)
> at
>com.bbn.openmap.io.BinaryFile.setJarInputReader(BinaryFile.java:212)
> at com.bbn.openmap.io.BinaryFile.<init>(BinaryFile.java:131)
> at
>com.bbn.openmap.io.BinaryBufferedFile.<init>(BinaryBufferedFile.java:84)
> at
>com.bbn.openmap.io.BinaryBufferedFile.<init>(BinaryBufferedFile.java:96)
> at
>com.bbn.openmap.layer.shape.SpatialIndex.<init>(SpatialIndex.java:178)
> at
>com.bbn.openmap.layer.shape.SpatialIndex.locateAndSetShapeData(SpatialIndex
.
>java:709)
> at
>com.bbn.openmap.layer.shape.ShapeLayer.setProperties(ShapeLayer.java:179)
>at com.bbn.openmap.util.ComponentFactory.create(ComponentFactory.java:129)
> at com.bbn.openmap.LayerHandler.getLayers(LayerHandler.java:307)
> at
>com.bbn.openmap.gui.OverviewMapHandler.setProperties(OverviewMapHandler.jav
a
>:334)
> at
>com.bbn.openmap.gui.OverviewMapHandler.init(OverviewMapHandler.java:242)
> at
>com.bbn.openmap.gui.OverviewMapHandler.findAndInit(OverviewMapHandler.java:
9
>02)
> at
>com.bbn.openmap.gui.OverviewMapHandler.setBeanContext(OverviewMapHandler.ja
v
>a:966)
> at java.beans.beancontext.BeanContextSupport.add(Unknown Source)
> at
>com.bbn.openmap.PropertyHandler.createComponents(PropertyHandler.java:515)
> at com.bbn.openmap.app.OpenMapApplet.init(OpenMapApplet.java:142)
> at sun.applet.AppletPanel.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
>where my applet is at http://host.name.com/openmap/
>with 2 jar files, openmap.jar that contains the altered BinaryFile.class
>and data.jar that contains a layer I am creating and the DTED and Political
>Boundaries data
>
>Any ideas why java is acting as if the jar is a local file that I don't
hava
>permission to access?
>
>thanks,
> Barney
>
>--
>[To unsubscribe to this list send an email to "majdart@bbn.com"
>with the following text in the BODY of the message "unsubscribe
openmap-users"]
>

2,000,000,000 Web Pages--you only need 1. Save time with My Lycos.
http://my.lycos.com

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe
openmap-users"]
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Mar 14 00:59:49 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT