#

## VNCviewer for Java

Because Java applets can only make connections back to the machine from which they were served, each of the VNC servers actually incorporates a small web server. This runs on port 58xx, where xx is the display number, and will only serve the Java applet classes and an HTML page which contains them.

This means that you should be able to point any Java-capable browser at, for example:

`http://snoopy:5802/`

and you should, after a short pause, be able to connect to your VNC session.

If you are using the X-based VNC server, you may need to specify the directory which contains the class files in the vncserver script. The Win32 server has the classes embedded in the server itself.

Java implementations seem to vary widely both in how fast they can read from the network and how fast they can draw to the screen. It's worth using the Options dialog to experiment with different encoding schemes for any given network and browser.

### Running as an application

You can run the viewer outside a browser using, for example:

`java vncviewer HOST snoopy PORT 5902`

Note that you need to specify the actual VNC port number and not the display number or the HTTP port number here! The precise command line will depend on your particular Java installation.

go back to documentation

| For comments, feedback, etc, please see the 'Keeping in touch' page. Copyright 1999 - AT&T Laboratories Cambridge