Re: netcdf-java v2.1 compilation error

xing wrote:


I attempted to compile v2.1-netcdfSrc.jar, but failed with error:

Buildfile: build.xml

    [echo] Initialize ucar.nc2


   [javac] Compiling 27 source files to 
exception dods.dap.NoSuchAttributeException is never thrown in body of 
corresponding try statement
   [javac]     } catch (dods.dap.NoSuchAttributeException e) { } // shold not 
throw an exception
   [javac]       ^
   [javac] /data0/xing/netcdf/work/Java-DODS/dods/dap/ 
warning: readLine() in has been deprecated
   [javac]         String line = d.readLine();
   [javac]                        ^
   [javac] /data0/xing/netcdf/work/Java-DODS/dods/dap/ 
warning: readLine() in has been deprecated
   [javac]     while (!(line = d.readLine()).equals("")) {
   [javac]                      ^
   [javac] 1 error
   [javac] 2 warnings

file:/data0/xing/netcdf/work/netcdf.old/build.xml:73: Compile failed; see the 
compiler error output for details.

Total time: 3 seconds

I am using j2sdk1.4.2_01 and apache-ant-1.5.4.
Tried deprecation too, no help.  Should I use older j2sdk?

I also tried v2.2-netcdfSrc.jar, it went fine.
But the codes are quite different than v2.1-netcdfSrc.jar

Which version of netcdf-java is recommended for development?

Thanks in advance,


2.1  is correct version, 2.2 is not released, and wont work.

you are using an incompatible version of dods source. any reason not to just use the provided netcdfDods.jar file?

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