[netcdf-java] please help for geotiffwriter

hello,

I have a question on geotiff,  Please help.

I compile codes, using

 Javac  -classpath /usr/share/netcdfUI-2.2.22.jar  
test.java Exception in thread "main" 

The compilation seems to be OK.  But when I run I got
error message:


?Exception in thread "main"
java.lang.NoClassDefFoundError:
ucar/nc2/geotiff/GeotiffWriter?

If I run, using ?java ?classpath
/usr/share/netcdfUI-2.2.22.jar test

I got error message like: 
 
??Exception in thread "main"
java.lang.NoClassDefFoundError: test?

Any suggestions are greatly appreciated.

I use intel linux box. The code are from internet as
the attechment.


Zitian

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
import ucar.ma2.*;
import ucar.nc2.*;
import ucar.nc2.dataset.*;
import ucar.nc2.geotiff.*;
import ucar.nc2.dataset.grid.*;
import ucar.unidata.geoloc.*;
import ucar.unidata.geoloc.projection.*;


import java.io.*;
import java.util.*;


public static void main(String args[]) throws IOException {
String fileOut = "totalr1.tif";
GeotiffWriter writer = new GeotiffWriter(fileOut);
writer.writeGrid("2003091116_ruc2.nc", "P_sfc", 0, 0, false,null);
writer.close();
}