Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Novice Newsgroups: comp.lang.java.programmer Subject: Compile Problem involving Dependencies Date: Sat, 29 Oct 2011 17:06:46 +0000 (UTC) Organization: Your Company Lines: 40 Message-ID: NNTP-Posting-Host: Yzqi07giy+IXRagYOPUEUQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: Xnews/5.04.25 X-Antivirus-Status: Clean X-Notice: Filtered by postfilter v. 0.8.2 X-Antivirus: avast! (VPS 111029-0, 2011-10-29), Outbound message Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9298 I'm having a problem compiling some Java code which I _think_ has to do with a dependency issue that I don't fully understand. I wonder if someone here can enlighten me? I have a class named FooApplet which is defined as public and extends JApplet. FooApplet makes use of a class I wrote called WrapUtils, which is simply a public class. WrapUtils in turn makes use of other classes I wrote called ErrorUtils and CountUtils, both of which are simply public classes. I'm using Eclipse 3.7 and FooApplet compiles just fine. However, WrapUtils shows compile errors at every mention of ErrorUtils and CountUtils. ErrorUtils and CountUtils both compile cleanly. The suggested fixes for the errors in WrapUtils include generating an import statement for ErrorUtils and CountUtils, even though they are in the same package as WrapUtils. When I click on the option to generate those imports, the import statement is NOT added to WrapUtils and the errors for ErrorUtils and CountUtils remain. The red "x" remains on WrapUtils both in the editor and in Package Explorer. Why does Eclipse not see the ErrorUtils and CountUtils? All of the classes are public and all of WrapUtils, CountUtils and ErrorUtils are in the same package, although it is a different package than the one containing FooApplet? So, to recap, we have: com.foo.FooApplet (public extends JApplet) - invokes com.foo.utilities.WrapUtils (public) - invokes com.foo.utilities.CountUtils (public) - invokes com.foo.utilities.ErrorUtils (public) All references to CountUtils and ErrorUtils in WrapUtils are flagged as compile errors: "CountUtils cannot be resolved". What stupid mistake am I making? Is this a dependency error? Or is the fact that the methods in WrapUtils, CountUtils and ErrorUtils are all static that are the source of the problem? -- Novice