Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Applet and policy file questions

Reply
Thread Tools

Applet and policy file questions

 
 
Neil Cherry
Guest
Posts: n/a
 
      01-18-2004
I'm writing an applet (Java 1.4.2) that needs to read one file and
write to another file on the user's PC. I've created a test applet and
I've run it through appletviewer and it works fine. When I run it
through Firebird (I'm using the javaplugin) I get an exception when I
attempt to write to the file (same applet that worked with
appletviewer).

I have a .java.policy in my $HOME directory and in
~/.java/deployment/security/java.policy and
~/.java/deployment/security/.java.policy (same file copied to 3
different places). I have a file called foo and bar in my home
directory and everyone has read and write permissions. Lastly this is
my policy file:

grant codeBase "file:." {
permission java.io.FilePermission "foo", "read, write";
permission java.io.FilePermission "bar", "write";
};

Any pointers? Also where would the file go if it were on a MAC or
Windows 2K or XP machine?

--
Linux Home Automation Neil Cherry http://www.velocityreviews.com/forums/(E-Mail Removed)
http://home.comcast.net/~ncherry/ (Text only)
http://linuxha.sourceforge.net/ (SourceForge)
http://hcs.sourceforge.net/ (HCS II)
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      01-18-2004
"Neil Cherry" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| I'm writing an applet (Java 1.4.2) that needs to read one file
and
| write to another file on the user's PC.
.....
| I have a .java.policy in my $HOME directory and in

I thought the 'policy' files were very
old hat and had been replaced by WebStart,
but Sun has made documents that mention
the policy file quite recently.

But that was just a round-about way to get
to my question. Had you considered
delivering your app. through Webstart?

Get that right and it should solve all security
problems (well, ..for the developer anyway)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site


 
Reply With Quote
 
 
 
 
Neil Cherry
Guest
Posts: n/a
 
      01-18-2004
On Sun, 18 Jan 2004 21:49:29 GMT, Andrew Thompson wrote:
> "Neil Cherry" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>| I'm writing an applet (Java 1.4.2) that needs to read one file
>| and write to another file on the user's PC.
> ....
>| I have a .java.policy in my $HOME directory and in
>
> I thought the 'policy' files were very
> old hat and had been replaced by WebStart,
> but Sun has made documents that mention
> the policy file quite recently.
>
> But that was just a round-about way to get
> to my question. Had you considered
> delivering your app. through Webstart?


Hmm, didn't know about that, I'll go look up web start. I have it on
one of my Windows boxes. I'll see if I can find it for Linux too.

--
Linux Home Automation Neil Cherry (E-Mail Removed)
http://home.comcast.net/~ncherry/ (Text only)
http://linuxha.sourceforge.net/ (SourceForge)
http://hcs.sourceforge.net/ (HCS II)
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-18-2004
"Neil Cherry" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| On Sun, 18 Jan 2004 21:49:29 GMT, Andrew Thompson wrote:

| ..I'll go look up web start.

It should come standard with the latest
Java. (So I'd be very surprised if it did
not come with both Linux and Apple
variants)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site


 
Reply With Quote
 
Neil Cherry
Guest
Posts: n/a
 
      01-19-2004
On Sun, 18 Jan 2004 23:31:19 GMT, Andrew Thompson wrote:
> "Neil Cherry" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>| On Sun, 18 Jan 2004 21:49:29 GMT, Andrew Thompson wrote:
>
>| ..I'll go look up web start.
>
> It should come standard with the latest
> Java. (So I'd be very surprised if it did
> not come with both Linux and Apple
> variants)


According to Sun it's in the 1.4.2 JRE (I have j2sdk1.4.2_02 which
should contain it). So far I know nothing about it but I just found
the API and I'm looking around. Turns out I also upgrade 1 Win2K PC so
I have it set up for Mozilla on 2 machines. On my other Windows
machine I'll setup IE (ick!) to use Web Start. I'll probalby still
have to figure out the policy issue since a few users may not be on
Web Start.

--
Linux Home Automation Neil Cherry (E-Mail Removed)
http://home.comcast.net/~ncherry/ (Text only)
http://linuxha.sourceforge.net/ (SourceForge)
http://hcs.sourceforge.net/ (HCS II)
 
Reply With Quote
 
Neil Cherry
Guest
Posts: n/a
 
      01-19-2004
On Sun, 18 Jan 2004 20:06:39 -0600, Neil Cherry wrote:
> On Sun, 18 Jan 2004 23:31:19 GMT, Andrew Thompson wrote:
>> "Neil Cherry" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>| On Sun, 18 Jan 2004 21:49:29 GMT, Andrew Thompson wrote:
>>
>>| ..I'll go look up web start.
>>
>> It should come standard with the latest
>> Java. (So I'd be very surprised if it did
>> not come with both Linux and Apple
>> variants)

>
> According to Sun it's in the 1.4.2 JRE (I have j2sdk1.4.2_02 which
> should contain it). So far I know nothing about it but I just found


I've done a bunch of poking around and JNLP (javaws) works half as
good as the demo's I'll be on very happy camper. The files are tiny,
which is real good because I need to rewrite a DOS Application and
store it on the XPort (www.lantronics.com) which only gives me 64K
of space to store the applet (JNLP?). Thanks for the info.

--
Linux Home Automation Neil Cherry (E-Mail Removed)
http://home.comcast.net/~ncherry/ (Text only)
http://linuxha.sourceforge.net/ (SourceForge)
http://hcs.sourceforge.net/ (HCS II)
 
Reply With Quote
 
Neil Cherry
Guest
Posts: n/a
 
      01-19-2004
On Sun, 18 Jan 2004 21:40:13 -0600, Neil Cherry wrote:
> On Sun, 18 Jan 2004 20:06:39 -0600, Neil Cherry wrote:
>> On Sun, 18 Jan 2004 23:31:19 GMT, Andrew Thompson wrote:
>>> "Neil Cherry" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>| On Sun, 18 Jan 2004 21:49:29 GMT, Andrew Thompson wrote:
>>>
>>>| ..I'll go look up web start.



>> According to Sun it's in the 1.4.2 JRE (I have j2sdk1.4.2_02 which
>> should contain it). So far I know nothing about it but I just found

>
> I've done a bunch of poking around and JNLP (javaws) works half as
> good as the demo's I'll be on very happy camper. The files are tiny,
> which is real good because I need to rewrite a DOS Application and
> store it on the XPort (www.lantronics.com) which only gives me 64K
> of space to store the applet (JNLP?). Thanks for the info.


Ignore the size comment, I was looking at the .jnlp file and not the
..jar file. Still very cool!


--
Linux Home Automation Neil Cherry (E-Mail Removed)
http://home.comcast.net/~ncherry/ (Text only)
http://linuxha.sourceforge.net/ (SourceForge)
http://hcs.sourceforge.net/ (HCS II)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Policy map using policy map Geoffrey Sinclair Cisco 1 07-27-2009 09:31 AM
Running signed applet without creating policy file in client side abcd Software 0 02-17-2009 06:37 AM
Default Domain Policy vs Default Domain Controller Policy Tyler Cobb MCSE 6 10-19-2005 09:36 PM
Default Domain Policy vs. Default Domain Controller Policy Tyler Cobb MCSA 1 10-09-2005 03:42 PM
Giving Applet Full Permission Without Policy File Darol Java 14 08-30-2005 03:47 PM



Advertisments