Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

importing a class in eclipse

  Asked By: Howard    Date: May 05    Category: Java    Views: 939
  

does anyone know how to import a package or class in eclipse ?
I get used to copy and paste a file / directory to my project, but
eclipse seems doesnt recognize my package or class. It always show up a
icon unresolved class type. If I try to compile, it worked ... but in
IDE it doesnt work.

I try to use Eclipse 2.1 and Eclipse 3.0 M4, both still has same problem.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Jawna Mohammad     Answered On: May 05

This is the way I do it:

Right click in the package  explorer New/Project. Choose Java
Project/next. Then where it says ‘Project contents’ untick use default
and browse to your class  directory.

 
Didn't find what you were looking for? Find more on importing a class in eclipse Or get search suggestion and latest updates.




Tagged: