Date: Tue, 21 Sep 2004 14:30:14 -0400 From: Christopher Rued <c.rued@xsb.com> To: Jason Dusek <jason-dusek@uiowa.edu> Cc: "java@freebsd.org" <java@freebsd.org> Subject: Re: netBeans can't find classes Message-ID: <41507336.80208@xsb.com> In-Reply-To: <415067DA.7000709@uiowa.edu> References: <415067DA.7000709@uiowa.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Jason Dusek wrote: > I'm sorry, there was an error in the first line of my message that > didn't make any sense. Rewritten, the message is: > > I am unable to compile a class that depends on another class within > the same directory when using netBeans, but if I use javac then I can > compile okay. > > The directory I'm working in looks like this: > > -rw-rw-r-- 1 jsn jsn 1672 Sep 20 10:52 Matrix.java > -rw-rw-r-- 1 jsn jsn 367 Sep 17 20:58 MatrixInterface.java > -rw-rw-r-- 1 jsn jsn 3157 Sep 21 10:59 MatrixMultiplication.java > -rw-rw-r-- 1 jsn jsn 4029 Sep 20 09:04 OldSparseMatrix.java > -rw-rw-r-- 1 jsn jsn 2388 Sep 20 10:11 SparseMatrix.java > > And the error that I get when I compile Matrix.java in netBeans 3.6 is: > > /home/jsn/.public-html/Classes/22c:021/Project_1/Matrix.java [13:1] > cannot resolve symbol > symbol : class MatrixInterface > location: class Matrix > public class Matrix implements MatrixInterface > ^ > 1 error > Errors compiling Matrix. > The most common reason for this sort of thing is that you have incorrectly mounted your source in NetBeans. If you mount the directory: /home/jsn/.public-html/Classes/22c:021/Project_1 and try to compile from within NetBeans, this should solve the problem. The reason for the issue is that each directory you have mounted is added to your classpath. To NetBeans, your interface's fully-qualified name probably looks something like "Project_1.MatrixInterface" (the class MatrixInterface in the Project_1 package), which is different than "MatrixInterface" (the class MatrixInterface in the default package). If you correct your mount point (i.e., classpath), all should be well. Hope that helps. --Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41507336.80208>