# Java: WebStart

## What is Java WebStart (JWS)?

- On web server.
- Started from web page
- Cached locally
- Checks for updates
- Can run offline

## How to build a JWS program

- Put everything in jar files: code, data, images, etc.
- Write a JNLP XML file that describes your JWS program.
- If you have to access restricted resources on the user machine, you will have to sign your application.

### Loading resources

From quantumf:

> The best way to get resources from a jar file is as follows:

>     //  As URL
>     Thread.currentThread().getContextClassLoader().getResource("config.properties");
>     //  As InputStream
>     Thread.currentThread().getContextClassLoader().getResourceAsStream("config.properties");

## Webliography

- Java Web Start 1.4.2 Developer Guide (java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/contents.html)
- Java Deployment Overview
- Java Web Start Guide
- JAR files revealed