File Access and Other Useful Features

One of the handy features of Web Start is that it allows you to read and write files. Before you get the impression that Web Start somehow opens your system to hacking, the file access routines in Web Start require the user to select a file for you—giving the user control over what files you can and cannot access.

Web Start has several other useful features to let you perform various other operations that the sandbox security restrictions normally prevent. The javax.jnlp package contains interfaces into these various services. You locate the services through a class called ServiceManager.

To read to a file, you first use the service manager to locate the FileOpenService interface, like this:

 FileOpenService ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.