In Netscape, communication between scripts and Java applets takes place via the LiveConnect interface. LiveConnect was originally designed for just this purpose. LiveConnect is only implemented in Netscape. However, similar but not identical functionality is available in MSIE via the ActiveX interface.
LiveConnect is most effective if you can also understand the internals of Java applets and can program in Java yourself. You can use LiveConnect to gain read and write access to the public fields of an applet and you can also invoke public methods. You can also interact with standard Java system classes that are built into the Netscape browser.
If a plugin is Java-enabled, then in Netscape you can interact with that plugin in the same way.
LiveConnect is constructed around some built-in objects that encapsulate various Java classes and objects. These are:
JavaObject - An encapsulation of an instance of a Java object that belongs to a JavaClass
JavaClass - An encapsulation of a Java class for access to static properties and methods
JavaPackage - A collection of JavaClass and JavaPackage objects in a tree-like hierarchy
There are some interesting opportunities here for extending the capabilities of your scripts with the facilities offered by Java. However, the downside is that you need to have a VM running. Netscape supports its own internal VM at least up to version 4, but the trend is for browsers to use the OS hosted VM and to not provide any embedded Java execution context. This may provide additional benefits such as sharing Java classes amongst several applications and shortening the start-up time since the VM could be expected to be running already.
LiveConnect becomes particularly useful when accessing the java.lang.System class from scripts running in Netscape. In MSIE, you could create a special applet that then gained access to the system class for you. Using this capability to any useful extent starts to impinge on the security model and requires that trusted scripts are used. This is usually enough to deter most people from exploring it more deeply. However, if you can gain that trust, by using signed scripts, you may then be able to access the Java IO facilities and read/write files.
Be careful not to confuse the following: