AutoDesk has a bizarre approach to setting up their Java-based MapGuide client. In theory, it should work on most platforms – but they only document it on Internet Explorer on a few platforms, and on Netscape 4.x on Solaris. On top of that, most of their installation instructions require using an extra Java applet to do the installation, or downloading a big shell script for Solaris.
I got it to work under Mozilla Firefox on Linux, and I’m sure it would work like this on Windows or MacOS as well. Here’s how I did it; adapt my approach to your setup.
- Download the JAR archive (mgjava.jar) from here.
- Try to figure out where to install it. I did this by visiting the VanMap website, which fails to load since it can’t find the JAR file. I right-clicked on the broken Java applet, which brought up a menu that allowed me to open the Java console. On my Java installation (J2RE 1.4), I got an error message like this:
load: class com/autodesk/mgjava/MGMapApplet.class not found.
java.lang.ClassNotFoundException: com.autodesk.mgjava.MGMapApplet.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:162)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:566)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1863)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
at sun.applet.AppletPanel.run(AppletPanel.java:298)
at java.lang.Thread.run(Thread.java:534)
and instructions telling me to press “s” to view the system properties. I did that, and found the Java CLASSPATH setting java.class.path = /usr/lib/j2se/1.4/jre/classes. If you can find that classpath setting, you’re good to go.
- Go to the classpath directory. On my system, the “classes” subdirectory didn’t exist and I had to create it. Unzip the mgjava.jar file to there (yes, JAR files are just zip archives).
- Restart Firefox. Visit the VanMap website again and see if everything’s working.
This whole procedure is amazingly painful. Debian’s documentation claims that the classpath is something different – they say it’s in /usr/share/java/repository. There are some jar files in /usr/share/java, but there is no repository directory. Installing the jar file there didn’t help at all. It’s also annoying that you have to unzip the jar file – that wasn’t obvious to me at all. Sigh… at least I’ve got it working now.