Contributors

VRMLworks

Managing Multiple Plugins

First of all, don't do it. Find one VRML plugin, and when you want to change it, uninstall it and install a new one. Or else have separate Netscape and MSIE browsers, each with its own plugin. It's far easier that way.

OK, you can't say I didn't warn you.

Swapping DLLs

Each Netscape Navigator plugin on Windows 9x systems (you're on your own with other setups) has its own DLL in the Netscape plugins directory. On most machines, the folder where they're found is

C:\Program Files\Netscape\Navigator\Program\plugins

or

C:\Program Files\Netscape\Communicator\Program\plugins

You're allowed to have only one VRML plugin DLL in that folder (though of course you may have many other DLLs, each handling another filetype). Many VRML plugin installation programs will ask you if you want to install their plugin as the default for VRML files and rename the DLL for another plugin. It's a good idea to follow their advice and rename the other plugin; if you have two VRML plugin DLLs in that folder, you're likely to have problems viewing VRML worlds.

Here are a few DLLs for VRML plugins:

DLL Name

VRML Plugin

npcosmop.dll Cosmo Player 2.0
npcosmop21.dll Cosmo Player 2.1
npvscp.dll Community Place
npWorldView.dll WorldView
npbx3d.dll

npbx3dpro.dll*
npbxpro.dll*
Blaxxun Contact
* multi-user world support:
need not be deactivated
when you activate another
browser
npCortona.dll ParallelGraphics Cortona

Take a look in your plugins folder and make sure only one of these DLLs is present.

Note that Blaxxun Contact installs three DLLs, but only npbx3d.dll has any effect on which plugin will be used to display VRML worlds.

How do you swap plugins, then? Rename the DLLs for the plugins you don't want to use and Netscape will no longer recognize them. A fairly common convention is to preface the name with an underscore; thus npcosmop21.dll becomes _npcosmop21.dll and when you restart Netscape, it no longer recognizes that it has a plugin for Cosmo Player.

Plugin swappers

There are three programs that automate that process for you:

Npchooser and One4All are free; Npzebra is US$20 shareware. Pay Sam, not me; the screen will nag you with his address until you register it.

You need to exit from Netscape before you run Npchooser. It brings up a small window and shows you the DLLs you have for all the content types Netscape recognizes. Look for the content types model/vrml and x-world/x-vrml. VRML has transitioned from the experimental "x-" MIME type to the approved type, but some VRML plugins will register themselves for one, some for the other, and some for both. Sigh.

Simply select a plugin in Npchooser, and move it from Active to Inactive or vice-versa with the arrow buttons.

There's two slightly tricky things to keep in mind for Npchooser. First, if you forget to exit from Netscape, the change won't take until you exit, and in the meantime Netscape may complain or crash when it tries to load a VRML world.

Second, it seems that just about every VRML browser has a string for the MIME type that shows up differently in Npchooser. So you may need to deactivate the Cosmo Player plugin from one of the entries for model/vrml and activate the Blaxxun plugin from one of the entries for x-world/x-vrml. This isn't a big deal. Just go down the whole list of MIME entries for model/vrml and x-world/x-vrml and make sure you have only one active DLL for all the different entries.

Npzebra does it differently. It requires you to rename all your VRML DLLs, prefacing their name with an underscore. Then move Npzebra.dll into your plugins folder. Each time you select a VRML world, Npzebra will ask you which browser to use.

One4All works similarly to Npzebra, except that you select the plugin you want to use only once. After that, you use the plugin you selected last unless you hold down the Ctrl key when you click on the link to the VRML world, in which case you're offered another plugin choice.

A Plugin and a Helper

When Netscape Navigator encounters a VRML file, it first looks to see if it has a plugin for that type of file. If so, it stops looking and launches the plugin. If not, it looks to see if it has a helper application identified for that type of file and launches the helper if it does.

That means that all you need to do to have, e.g., Cosmo Player (plugin) and Community Place (the helper version, not the plugin version) on your computer is to rename the Cosmo DLL so that Netscape doesn't recognize it and have Community Place set up as a helper app. Change one filename and you're done.

Well, almost.

The Dreaded Classpath Problem

All your troubles should be over if you can swap the DLLs, right? Maybe. The browser makers have mostly solved a problem that plagued multiple browser owners for more than a year, but there are still a few older versions of browsers out there that may suffer from it. If you've installed a browser that asks you for permission to modify C:\Autoexec.bat, read on, and weep. Otherwise, thank the hard working people who make VRML browsers for coming up with a solution to what was once a formidable problem.

Nearly all VRML plugins have Java classes that implement the Java Scripting interface and the External Authoring Interface. Guess what? They're all different. And if you try to run a VRML plugin with another plugin's Java classes, it'll crash Netscape, either when you try to view the VRML world or after you exit the VRML world.

Worse, there are two different ways browsers access their classpaths. The current Cosmo Player puts a file npcosmop21.jar in the plugins folder. Community Place and WorldView put the classes in other folders and modify your autoexec.bat file to add those folders to your %CLASSPATH% environment variable.

Solving the Classpath Problem

Here's the way I've solved the problem on my machine.

  1. Create a folder called C:\Java\Classes

  2. Take the file vsclass.zip from wherever Community Place installed it and copy it to C:\Java\Classes. Rename it to sony.zip.

  3. Take the file Npcosmop.zip from the Netscape plugins directory and move it to C:\Java\Classes. Do not leave a copy of that file in the plugins directory. Rename it to cosmo.zip.

  4. Take the two folders called intervista and vrml from wherever WorldView installed them and zip them up, including directory names, but with no compression into a new zip file called intervista.zip. The intervista and vrml names should be at the top of the path. Here's what the file should look like in WinZip32:

    Note the Path column and the fact that the Size and Packed columns show that the files are not compressed.

  5. Move that file to C:\Java\Classes.

  6. Make a copy of that zip file into the C:\Java\Classes folder and name it current.zip.

  7. Now make a new folder in the C:\Java\Classes folder called backup. Inside that folder make three folders called intervista, sony, and cosmo.

  8. Copy the intervista and vrml folders and all their contents from wherever WorldView installed them to the intervista folder you just made.

  9. Unzip cosmo.zip and sony.zip into their folders. Look at the figure below to see that your directory tree looks exactly like this (except for it being on the F: drive):

  10. Now add the following lines to C:\Autoexexc.bat
    SET CLASSPATH=C:\java\lib\classes.zip;.
    SET CLASSPATH=C:\Program Files\Netscape\Navigator\java\bin\classes\java_301\;%CLASSPATH%
    SET CLASSPATH=C:\java\classes\current.zip;C:\java\classes\current;%CLASSPATH%
    
    Of the three lines, only the last is essential unless you have Sun's JDK and want to develop Java code on your own.

    Remove or REM out all other CLASSPATH lines in Autoexec.bat

  11. Now reboot your computer.

  12. Use whatever tool you like to make the WorldView DLL the only VRML plugin DLL (see the section above for details).

  13. Go to a VRML world.

Now whenever you want to swap plugins, you do the following:

  1. Get out of Netscape
  2. Make the plugin you choose the only active VRML plugin by renaming the DLLs (using one of the tools above, or by hand)
  3. Go to your C:\Java\Classes folder and delete current.zip
  4. In the same folder make a copy of the zip file corresponding to your browser and rename it current.zip
  5. Restart Netscape

Compiling Java

If you compile VRML code for Java you may get an error message saying that it doesn't recognize the VRML classes. You were wondering why we made a backup folder, weren't you? Go to that folder, make a copy of the appropriate folder (the topmost intervista folder if you're compiling to run under WorldView, etc.) and all its contents, rename it, and move it up one level in the tree so that it becomes C:\Java\Classes\current. Delete C:\Java\Classes\current.zip and you should be able to compile and view your world.

You may have wondered why it's necessary to compile with Intervista's VRML classes if you're going to run under WorldView. It isn't. When all VRML plugins have a full set of VRML classes, you can use any one as current at compile time. At run time you'll still need to use the zip file or folder corresponding to your plugin.

Now do you believe what I said about sticking with one plugin?

Did I leave something out about multiple plugins? Let me know.

-- Bob Crispen
-- Saturday, March 4, 2000