VisAD FAQ


See the VisAD home page for an introduction to VisAD, source and example files, and links to VisAD API documentation.

For the latest VisAD happenings, subscribe to the visad mailing list by sending a message to majordomo@unidata.ucar.edu with no subject, and

subscribe visad

as the first line of the message body. If you want only a daily digest of messages from the VisAD list, instead subscribe to visaddigest.



FAQ Contents

General Questions
What do I need to run VisAD?
Are there detailed instructions on how to install VisAD?
How can I find out when the VisAD source has been updated?
Can I run VisAD applets in a web browser?
Which versions of Java work with VisAD? Which versions of Java3D?

Compilation Questions
How do I compile VisAD on my Windows machine?
The rmic compiler complains that none of the VisAD class files are found.
When I try to compile, I receive a string of errors starting with "java.util.AbstractList not found in import."
When I type "make compile" I get an error.

Troubleshooting
My Java3D displays appear corrupted. There are random white lines or polygon fragments everywhere. How do I fix it?
I can't run VisAD because Java3D doesn't work correctly.
I'm having trouble running VisAD remotely from an SGI (or other non-Sun).
I can't download any jar files from the VisAD web site.

Other Questions
Do you have any pictures of anyone playing bagpipes?
My question isn't in this FAQ. How can I get an answer?




General Questions

Q: What do I need to run VisAD?

A: You must have Java installed on your system. Java3D is required for 3-D displays (however, you can do 2-D displays using Java2D, which is included with Java). Currently, Java3D is only available for a limited set of platforms, including Windows, Mac OS X, Linux and Solaris Sparc & x86.


Q: Are there detailed instructions on how to install VisAD?

A: There are two ways to install VisAD. One of them uses the precompiled visad.jar file, giving you access to the complete VisAD API, but not to VisAD's source code (meaning you cannot make changes to VisAD itself). The other installs VisAD's complete source code into its own directory structure and requires you to compile that source code yourself.

Here are detailed instructions for both of these installation types.

Installing VisAD using visad.jar
  1. Install Java.
  2. Optionally, install Java3D. To test the Java3D installation, you can run the examples that come with Java3D.
  3. Download the visad.jar file. With Netscape, you may need to hold Shift while clicking the file's link. Choose a safe directory where you can store the file.
  4. Set your CLASSPATH environment variable to point to the location of the visad.jar file that you just downloaded.
    • On a Solaris machine, add the following line to your login script:
      set CLASSPATH /home/username/visad.jar
      where /home/username/visad.jar is your visad.jar from step 3. Then, log out and back in again.
    • On a Linux machine, add the following line to your login script:
      export CLASSPATH=/home/username/visad.jar
      where /home/username/visad.jar is your visad.jar from step 3. Then, log out and back in again.
    • On a Windows NT/2000/XP machine, right-click My Computer, choose Properties, go to the Environment tab, and add a variable called CLASSPATH with value:
      C:\visad.jar
      where C:\visad.jar is your visad.jar from step 3. Then, log out and back in again.
    • On a Windows 9X machine, add the following line to your AUTOEXEC.BAT file:
      set CLASSPATH=C:\visad.jar
      where C:\visad.jar is your visad.jar from step 3. Then, reboot your machine.
  5. Try running the VisAD SpreadSheet to verify your installation:
    java visad.ss.SpreadSheet
    You should see a complex GUI with four black display panels. If you installed Java3D, you will be able to visualize data in VisAD in 3-D. Otherwise, you will be limited to 2-D only.
Installing VisAD from Java source code
  1. Install Java.
  2. Optionally, install Java3D. To test the Java3D installation, you can run the examples that come with Java3D.
  3. Choose a directory as your base directory for Java source files.
    • On a Solaris machine, you could use:
      ~username/java
      where ~username is your user name.
    • On a Windows machine, you could use:
      C:\Java
    Create this directory if it does not already exist.
  4. Set your CLASSPATH environment variable to equal the chosen directory along with the current directory (.).
    • On a Solaris machine, add the following line to your login script:
      set CLASSPATH /home/username/java;.
      where /home/username/java is your directory from step 3. Then, log out and back in again.
    • On a Windows NT/2000/XP machine, right-click My Computer, choose Properties, go to the Environment tab, and add a variable called CLASSPATH with value:
      C:\Java;.
      where C:\Java is your directory from step 3. Then, log out and back in again.
    • On a Windows 9X machine, add the following line to your AUTOEXEC.BAT file:
      set CLASSPATH=C:\Java;.
      where C:\Java is your directory from step 3. Then, reboot your machine.
  5. Download the visad_src-2.0.jar file. With some browsers, you may need to right-click and choose "Save link as" or similar option. Save the file to your Java base directory from step 3.
  6. From the command line, change to your Java base directory, then type:
    jar xvf visad_src-2.0.jar
    You will see the VisAD source files being extracted into their appropriate directory structure.
  7. Compile VisAD. If you are on a Unix system, type:
    cd visad
    make compile
    If you are on a Windows system, type:
    cd visad
    nmake -f Makefile.WinNT compile
    Note that the nmake command requires that you have Microsoft's NMAKE utility installed on your system.
    Be patient while VisAD compiles. It may take a few minutes depending on your system configuration.
  8. Try running a simple VisAD example to verify your installation:
    cd examples
    java SimpleImage
    You should see a 3-D display that can be rotated with the mouse.

Q: How can I find out when the VisAD source has been updated?

A: VisAD is constantly undergoing improvements, additions, and bugfixes. Major improvements to VisAD will usually be announced on the VisAD mailing list. To find out if you have the latest version of VisAD, compare the contents of the DATE file in your VisAD directory with those from this DATE file.


Q: Can I run VisAD applets in a web browser?

A: Yes, VisAD works in an applet using the Java Plug-in (which is packaged with Java, and should not need to be downloaded separately). With this approach, however, each machine that needs to run your VisAD applet must also have the Java Plug-in installed. For an example, see this example VisAD applet.

There is currently an issue where certain VisAD displays fail to display data depictions on subsequent applet initializations after the first. Hitting Refresh (reinitializing the applet) a few times seems to be a viable workaround. Also, pressing 'X' at the Java Plug-in console to clear the classloader cache, followed by a subsequent reload of the applet, solves the problem.

Another approach for VisAD-based applets is to use sockets to serve a VisAD display from a server to an applet client using a slave display (i.e., send just the display image to the applet, not the actual data, thus eliminating the need for Java3D within the applet). VisAD provides a set of slave display classes for such a purpose; see the documentation for the visad.SocketSlaveDisplay class for more detailed information. However, slave displays are quite slow (usually less than 5 FPS). Also, applets have a serious restriction: they cannot connect to a server via sockets unless that server is running on the codebase machine.


Q: Which versions of Java work with VisAD? Which versions of Java3D?

A: VisAD works with Java 1.4 or later. Java3D 1.2.1 or later is required for VisAD to have proper support for 3-D displays. Versions of Java3D before 1.2.1 have had issues that made VisAD's 3-D displays unusable.


Compilation Questions

Q: How do I compile VisAD on my Windows machine?

A: We recommend you use Apache Ant, as it is cross platform.

Alternately, you can use Microsoft's NMAKE utility, which works similarly to Unix make. A Windows-specific Makefile is provided with VisAD for use with NMAKE. To use it, type

nmake -f Makefile.WinNT

from your VisAD directory.


Q: The rmic compiler complains that none of the VisAD class files are found.

A: The problem is most likely that your CLASSPATH does not include the parent directory of your VisAD directory. For example, if the location of VisAD on your machine is /java/visad, your CLASSPATH should include the /java directory.


Q: When I try to compile, I receive a string of errors starting with "java.util.AbstractList not found in import."

A: Make sure you are using a recent enough version of Java. VisAD requires Java 1.4 or later, and will not compile with JDK 1.1.


Q: When I type "make compile" I get an error.

A: First, if you have Apache Ant installed, try the ant build script. If you still want to use the makefile instead, make sure your CLASSPATH environment variable includes the parent directory of your VisAD directory.

Either way, make sure that you are using Java 1.4 or later, and that you have all of the files necessary to run Java3D. Verify that your problem is with VisAD and not Java3D by testing the examples that come with Java3D. If you still have problems, send e-mail to the VisAD mailing list.


Troubleshooting

Q: My Java3D displays appear corrupted. There are random white lines or polygon fragments everywhere. How do I fix it?

A: There are bugs in your machine's implementation of OpenGL. On Windows, first look for updated drivers for your graphics card. If you have installed the latest drivers and the problem still occurs, then the drivers still have bugs. You can use Microsoft's Windows 95 OpenGL drivers, but they do not support hardware acceleration.


Q: I can't run VisAD because Java3D doesn't work correctly.

A: Java3D only works on a limited subset of machines capable of running Java. It runs on machines with SunOS and OpenGL 1.1.1 or higher, and on Windows machines with OpenGL 1.1 or higher. Also, there is an Irix 6.2 - 6.5 developer release available from SGI. It does not yet work on Solaris x86 machines. If you are running Windows 9X and have trouble with the OpenGL version of Java3D, be sure to try the Direct3D beta release.

The Java3D FAQ has answers to common Java3D questions that are not specific to VisAD.


Q: I'm having trouble running VisAD remotely from an SGI (or other non-Sun).

A: Unfortunately, Java3D is not compatible with SGI OpenGL. Setting DISPLAY to a Sun machine with Java3D for remote display works from other Sun machines, but probably won't work from a non-Sun machine.


Q: I can't download any jar files from the VisAD web site (if using Netscape Communicator, a typical error message is "SmartUpdate failed: JAR archive failed security check. Corrupt JAR file.").

A: Netscape Communicator 4.04 and later support execution of jar files, but only if they are signed with RSA encryption. The VisAD web site provides unsigned jar files. Netscape tries to execute them, but the security check fails because they are not signed. Other browsers might have similar problems. To download the jar file instead of executing it, hold Shift and click the jar file, or right click and choose "Save link as" or similar option. Alternately, use an FTP client to retrieve the file.


Other Questions

Q: Do you have any pictures of anyone playing bagpipes?

A: Yes; Steve Emmerson of Unidata, responsible for VisAD's excellent netCDF file adapter, can be seen playing bagpipes here.


Q: My question isn't in this FAQ. How can I get an answer?

A: Send e-mail to the VisAD mailing list. Be sure to include the exact wording of any error messages you received so that your question can be answered more quickly. Replies will be sent to the VisAD mailing list so be sure to subscribe to receive the reply.


This page was last updated Tuesday, 30 October, 2007.