Reputation: 146
I have a homework assignment that requires us to use functions in a provided .class file. I'm trying to add it in Eclipse, but I'm not having any luck.
The .class file is not part of a package, and I am not submitting it with my .java files. This means I cannot change the directory of the .class file, it needs to be in the same directory with all my .java files. I don't think I can add an external class folder with these requirements. Adding the file to a .jar is also out of the question.
How can I get my java code to recognize the methods in the .class file?
Upvotes: 2
Views: 289
Reputation: 21343
You need to add the class folder where your .class file is located. To do that go to the Project Properties -> Java Build Path -> Add Class Folder
Upvotes: 4