I have two files like read.java
and sufer_type.java
. The surfer_type.java
needs some methods which are present in a .jar
file. Before executing surfer_type.java
I need to run read.java
and use the data from read.java
. So I used the statement:
read r=new read();
in surfer_type.java
and I am compiling surfer_type.java
like:
javac -classpath netcdfAll.jar surfer_type.java:
But I am getting an error:
surfer_netcdf.java:30: cannot find symbol
symbol : class read
location: class surfer_netcdf
read r = new read();
^
surfer_netcdf.java:30: cannot find symbol
symbol : class read
location: class surfer_netcdf
read r = new read();
You are trying to instantiate a class read
, which it is telling you does not exist (or rather, it cannot find).
Make sure the class exists and is properly imported in the class where you are trying to use it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.