0

I have two classes, Phone.class and Time.class. I would like to use their methods for my project in eclipse, but I cant figure out how to do it successfully. How do you import the .class files so that I can use their methods in eclipse?

1 Answer 1

1

Add the folder containing both classes to the build path for the project: right-click on the project in the Package Explorer window and select the Build Path option, then select the Configure Build Path option. The Libraries tab has Add Class Folder and Add External Class Folder options: use the first if the folder with the class files is already part of the project, otherwise use the second. Select the folder and then hit OK and you should be good to go.

1
  • I can see the exception class that I imported, but I still can't use the methods from the 2nd class. Do you know why this is?
    – Andrew
    May 23, 2011 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.