From owner-freebsd-java@FreeBSD.ORG Tue Sep 21 18:45:17 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44A8B16A4CE for ; Tue, 21 Sep 2004 18:45:17 +0000 (GMT) Received: from mx1.portjeff.net (mx1.portjeff.net [216.168.142.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB3AF43D3F for ; Tue, 21 Sep 2004 18:45:14 +0000 (GMT) (envelope-from c.rued@xsb.com) Received: from localhost (localhost [127.0.0.1]) by mx1.portjeff.net (Postfix) with ESMTP id BED074DC9D; Tue, 21 Sep 2004 14:43:39 -0400 (EDT) Received: from mx1.portjeff.net ([127.0.0.1]) by localhost (mx1 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10544-07; Tue, 21 Sep 2004 14:43:37 -0400 (EDT) Received: from xsb.com (mail.portjeff.net [216.168.142.132]) by mx1.portjeff.net (Postfix) with ESMTP id 6F7575BCCC; Tue, 21 Sep 2004 14:26:58 -0400 (EDT) Received: from [10.25.1.120] [129.49.16.170] by xsb.com with ESMTP (SMTPD32-7.15) id A2DE190204; Tue, 21 Sep 2004 14:28:46 -0400 Message-ID: <41507336.80208@xsb.com> Date: Tue, 21 Sep 2004 14:30:14 -0400 From: Christopher Rued User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jason Dusek References: <415067DA.7000709@uiowa.edu> In-Reply-To: <415067DA.7000709@uiowa.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mx1.portjeff.net cc: "java@freebsd.org" Subject: Re: netBeans can't find classes X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 18:45:17 -0000 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