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


vijay Krishnan

Joined: Jul 27, 2006
Posts: 14
Hi Friends,

Just one week before i had posted the question about the same subject,
but somebody cant understand that question what i had asked.
Now it comes with correct question.

public class Super
int i=5;

package call;
class sub extends Super
void print()
public static void main(String[] args)
new Sub.print();

Here my doubt is,
* Normally i had creted two files in different drives like E:\ and D:\;
* The above program without package expansion it will work by setting
the classpath;
* But i had creted the package file in D:\ drive and the normal class file
in E:\ drive, eventhough i had set out the classpath it wont work;
* I need to know how to create or SET the Classpath to access the Package
file which resides in D:\ drive.

Thanks & Regards,
I agree. Here's the link:
subject: PackageInheritance
It's not a secret anymore!