PersistenceService in JAWS

Discussion in 'Java' started by Mike Westerfield, Mar 5, 2004.

  1. 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)
    ServiceManager.lookup("javax.jnlp.BasicService");
    URL cookie = new URL(basic.getCodeBase(), "cookie.txt");
    final PersistenceService service = (PersistenceService)
    ServiceManager.lookup("javax.jnlp.PersistenceService");
    final PrintStream out = new PrintStream(new
    BufferedOutputStream(service.get(cookie).getOutputStream(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
    cookie?

    Mike Westerfield
    Mike Westerfield, Mar 5, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kent
    Replies:
    1
    Views:
    358
    James David Miller
    Apr 1, 2004
  2. Roedy Green

    JAWS and Netscape/Firefox

    Roedy Green, Aug 2, 2005, in forum: Java
    Replies:
    18
    Views:
    1,903
    Hemal Pandya
    Aug 3, 2005
  3. Roedy Green

    JAWS shortcut failure

    Roedy Green, Oct 19, 2005, in forum: Java
    Replies:
    13
    Views:
    7,129
    Roedy Green
    Oct 20, 2005
  4. Roedy Green

    Why is JAWS so slow so start

    Roedy Green, Jan 9, 2006, in forum: Java
    Replies:
    9
    Views:
    878
    Raymond DeCampo
    Jan 10, 2006
  5. Roedy Green

    JAWS failure

    Roedy Green, Feb 22, 2008, in forum: Java
    Replies:
    7
    Views:
    408
    Roedy Green
    Feb 28, 2008
Loading...

Share This Page