I know this has been asked a few times, but I can’t find a solution using those answers.
I have a class file called LRW.class which I have put in an folder called external in the eclipse folder under my program name. So my path to the class is: myusername.WorkBench.ProjectA.external.LRW.class and I’ve made that folder using the new class folder in eclipse.
How do I use/import/call this class in java?
TIA
If it’s in the default package, being used by a class in the default package, you don’t need to import it at all. If the class using
LRWisn’t in the default package, it would be easiest to putLRWin a package–you can’t import classes in the default package (see JLS section 7.5).If it complains it isn’t found, you’ll need to make sure that folder is listed in the project’s build path (right-click project -> properties, Java build path, Libraries tab, Add Class Folder).