NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Viviane Vasconcellos de Menezes wrote:
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: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)Vat 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
java -classpath netcdf.jar teste.Application1see if you can get that working, then try building a jar that has everything in it.
netcdf-java
archives: