This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I am adding a class to an existing project and it makes sense to place it in a different package. The existing numerous classes were not 'packaged' so their class files are in the directory where their java files sit. I want to access one of these classes but I don't know how to get to it. There is no package to import. How do I get around this problem? Paul
If the Class has no package, then you have to put whatever directory you put the .class file in, in the CLASSPATH. So, if you decide to put your .class file in a subdirectory, then that subdirectory has to be in the classpath. I hope that helps.
Joined: Mar 15, 2000
That makes complete sense to me but I tried it, and it didn't work. I even tried putting the class file itself into the classpath and still no luck. Any ideas? Thanks. Paul