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

Re: netcdf-java v2.1 compilation error

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: Re: netcdf-java v2.1 compilation error
  • Date: Fri, 05 Dec 2003 15:04:13 -0700

xing wrote:

Hi,

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

Buildfile: build.xml

init:
    [echo] Initialize ucar.nc2

release-settings:

compile:
   [javac] Compiling 27 source files to 
/data0/xing/netcdf/work/netcdf.old/build/classes
   [javac] 
/data0/xing/netcdf/work/netcdf.old/src/ucar/nc2/dods/DODSAttribute.java:65: 
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/DConnect.java:468: 
warning: readLine() in java.io.DataInputStream has been deprecated
   [javac]         String line = d.readLine();
   [javac]                        ^
   [javac] /data0/xing/netcdf/work/Java-DODS/dods/dap/DConnect.java:594: 
warning: readLine() in java.io.DataInputStream has been deprecated
   [javac]     while (!(line = d.readLine()).equals("")) {
   [javac]                      ^
   [javac] 1 error
   [javac] 2 warnings

BUILD FAILED
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,

Zhangfan


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?

ftp://ftp.unidata.ucar.edu/pub/netcdf-java/v2.1/netcdfDods.jar