Skip to main content



      Home
Home » Newcomers » Newcomers » Cannot resolve methods from .class file in the same directory.
Cannot resolve methods from .class file in the same directory. [message #76959] Sat, 11 June 2005 16:38 Go to next message
Eclipse UserFriend
Originally posted by: NotARealEmail.ddress.com

I have eclipse 3.0.2.

I created a java application project (for a college course) with a single
file called Initials.java. We were provided with an IO.class file by our
instructor, which I put in the same directory as Initials.java. However,
when I tried calling the methods by "IO.method(...)", they were not
recognized by the compiler (it's underlining IO in red). How do I
integrate this IO.class file?

Another problem I'm having is that when I try open Help Contents, a blank
screen comes up. I saw this on the Eclipse FAQ a few weeks ago, and it
appeared to be an unresolved problem then, but its no longer on the FAQ.
I could not find the resolution anywhere.

Thank you in advance for your help.
Re: Cannot resolve methods from .class file in the same directory. [message #78253 is a reply to message #76959] Wed, 15 June 2005 17:58 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

exquisitus wrote:
> I have eclipse 3.0.2.
>
> I created a java application project (for a college course) with a
> single file called Initials.java. We were provided with an IO.class
> file by our instructor, which I put in the same directory as
> Initials.java. However, when I tried calling the methods by
> "IO.method(...)", they were not recognized by the compiler (it's
> underlining IO in red). How do I integrate this IO.class file?

What package is the class IO supposed to be in? Let's assume the fully
qualified name of the class is com.foo.IO for this discussion (you can
substitute the actual package name)

In Eclipse, you maintain source code, compiled classes, and libraries
(pre-compiled classes and/or JARs) in separate locations in your
project. You'll need to put the compiled class that your instructor
provided into a lib directory (you can call the directory anything, but
lib/ is a common choice), then include that lib directory on the
project's Build Path (see the Project > Properties dialog). One more
thing - make sure that the IO.class file is located in a directory
structure that matches the package the class was declared in.

The Java tutorial that comes with Eclipse will help you understand the
details of what I've said above - I highly recommend you go through that
tutorial as it will make your life a lot easier as you learn Eclipse.

HTH,
Eric
Previous Topic:Dynamic Views
Next Topic:Appropriate/best newsgroup for an Eclipse/CVS question
Goto Forum:
  


Current Time: Tue May 13 23:18:59 EDT 2025

Powered by FUDForum. Page generated in 0.24621 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top