File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes importing root stuff Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "importing root stuff" Watch "importing root stuff" New topic
Author

importing root stuff

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
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
Rick Bos
Greenhorn

Joined: Mar 05, 2002
Posts: 10
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.
Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: importing root stuff
 
Similar Threads
Checking Package Hierarchy
using package name starting with java or javax
Problems with packages using Forte
creating a testing framework using JUnit
break MISSING_BLOCK_LABEL_293