[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with a NetcdfDataset



Viviane Vasconcellos de Menezes wrote:

John,

OK. I've wrote the path wrong in my last email, in my program it was OK: c:/../BFOR.nc.
I put the e.printStackTrace() and the following messages were done:

java.lang.NoSuchMethodError: ucar.nc2.Dimension.<init>(Ljava/lang/String;I)V
   at ucar.nc2.dataset.DimensionDS.<init>(DimensionDS.java:36)
   at ucar.nc2.dataset.NetcdfDataset.<init>(NetcdfDataset.java:179)
   at ucar.nc2.dataset.conv.Convention.factory(Convention.java:128)
   at teste.Application1.<init>(Application1.java:38)
   at teste.Application1.main(Application1.java:57)
Exception in thread "main"

C:\java\bin>java -jar "c:\toolkit\toolkit\teste\teste.jar"
Exception in thread "main" java.lang.NoClassDefFoundError: ucar.nc2.dataset.conv
.COARDSConvention
       at ucar.nc2.dataset.conv.Convention.class$(Convention.java:42)
       at ucar.nc2.dataset.conv.Convention.<clinit>(Convention.java:42)
       at teste.Application1.<init>(Application1.java:38)
       at teste.Application1.main(Application1.java:56)

I've tried with another nc file and the same have happen. I'm attaching the cdl from my nc file if you need it ... it have 17KB.

Thanks for your help

Viviane

somehow your classpath is wrong, perhaps how you built the "teste.jar". Try using the netcdf.jar in the classpath, and execute your main, eg:

 java -classpath netcdf.jar teste.Application1

see if you can get that working, then try building a jar that has everything in it.