Re: help with a NetcdfDataset

Viviane Vasconcellos de Menezes wrote:


OK. I've wrote the path wrong in my last email, in my program it was OK: c:/../
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>(
   at ucar.nc2.dataset.NetcdfDataset.<init>(
   at ucar.nc2.dataset.conv.Convention.factory(
   at teste.Application1.<init>(
   at teste.Application1.main(
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
       at ucar.nc2.dataset.conv.Convention.class$(
       at ucar.nc2.dataset.conv.Convention.<clinit>(
       at teste.Application1.<init>(
       at teste.Application1.main(

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


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.

  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: