Meaningless Drivel is fun!
The moose likes Applets and the fly likes writing and reading from a existing file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "writing and reading from a existing file" Watch "writing and reading from a existing file" New topic

writing and reading from a existing file

navish kumar

Joined: Sep 17, 2003
Posts: 3
I have a applet and i know it is very difficult (Security Managers) to read and write from a file.
I have this applet and want it to write and read from a file with some manipulations like sorting and etc.

I would like to know how can i make this happen
1. make this applet read a file or write into the file with any kind of script lang if possible.
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Sending to the applet forum, would be better answered there I reckon!
Rob Ross

Joined: Jan 07, 2002
Posts: 2205
Well, you can either use the old signing method, or the new policy method from java 1.2.
If you sign your applet, then it will be able to read and write files to the local file system.
What platform, browser, and JVM are you going to be using? Getting your applet signed can be a little tricky, and it works completely different on Netscape Vs. IE.

SCJP 1.4
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Actually, having doen a little cathing up, it looks like the signing's the "easy" part. From what I saw, you then have to get the rules into the classpath with no automated assistance. Or, in other words, by making the user merge properties into the security file used by the browser
Which may be why Sun likes Java Web Start these days (in Java 1.4, JWS becomes part of the basic Java package).
Anyway, thanks to that silly little deal where Microsoft lost a $500 million lawsuit over plugins, it's quite possible that the W3C will pull all plugin support out of HTML -- including applets -- whether signed or not.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: writing and reading from a existing file
It's not a secret anymore!