# Simple LiveConnect Sample Plug-in

This sample plug-in demonstrates how to write a LiveConnect-enabled plug-in. You should see in the plug-in rectangle below the text "Hello World" and messages written to the Java Console and to stdout to tell you what it's doing. And if you click the JavaScript button, it will tell you another thing or two.

#### Open the Java Console (under the Options menu) to see the output!

#### Problems?

- I don't see any output in the Java Console or to stdout: This is probably because the Simple.class file isn't installed correctly. For Macintosh, the class file must be in "System Folder:Preferences:Netscape Ÿ:Java:netscape-classes". (In the next beta release it should be possible to simply place the class file in the plugins directory.) For Windows, the class file should be in the Plug-in folder along side the DLL.

- I still don't see any output in the Java Console or to stdout: This may be because you don't have your moz3_0.zip file in the proper place. Try visiting a page with an applet to see if it works. Also make sure that Java isn't disabled (under the Options menu, Network Preferences..., Language).

- I get a dialog offering to download the plugin: This is most likely because the Plug-in file (npsimple.dll on Windows, npsimple.so on Unix, or SimplePPC on PowerPC Mac) isn't installed in the plug-in directory. Also check that the list of helpers (under Options, General Preferences..., Helpers) contains an entry for type application/x-simple-plugin that names the Simple LiveConnect Sample Plug-in.

- I get Java Console output, but nothing to stdout: If you're on a Mac, forget it. You'll never see stdout. If you're on a Windows machine and you launched the Navigator by double clicking an icon, you also won't get any stdout.

- When I click the button, I get an error dialog from JavaScript saying "Window.Function.Document.simple1 has no properties.": This is because the Simple.class file was not found in the Plug-ins directory. You'll also notice that you're not getting any messages to the console in this case.

- Other problems?: Check with the Netscape LiveConnect/Plug-in developer's news group, snews://secnews/netscape.devs-plugins.