Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > PersistenceService in JAWS

Thread Tools

PersistenceService in JAWS

Mike Westerfield
Posts: n/a
I'm trying to use PersistenceService from an application launched from
JAWS in Windows XP using Java 1.4.2 to store some user preferences. I
get an error trying to open an output stream like this:

final BasicService basic = (BasicService)
URL cookie = new URL(basic.getCodeBase(), "cookie.txt");
final PersistenceService service = (PersistenceService)
ServiceManager.lookup("javax.jnlp.PersistenceServi ce");
final PrintStream out = new PrintStream(new
BufferedOutputStream(service.get(cookie).getOutput Stream(true)));

The path returned by service.get(cookie).getName() shows a path I did
not expect. Instead of the JAWS cache with the url expanded as
directories, which is where JAWS stores the jar file, the path had the
directory name \muffins\ inserted between the cache directory path and
the url portion of the path. Even when I created this path by hand, I
still got a file not found exception from the above code.

The application is signed, so I'll use the option of creating the path
and output stream using File objects, but I am curious: what is wrong
with this method of opening an output stream for a JAWS application

Mike Westerfield
Reply With Quote

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
Why is JAWS so slow so start Roedy Green Java 9 01-10-2006 07:21 PM
JAWS shortcut failure Roedy Green Java 13 10-20-2005 10:24 AM
JAWS and Netscape/Firefox Roedy Green Java 18 08-03-2005 03:42 PM
Dose anyone know about JAWS? kent Java 1 04-01-2004 07:24 PM
Price drop on Jaws Ray DVD Video 0 01-04-2004 05:58 AM