This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "PackageInheritance" Watch "PackageInheritance" New topic
Author

PackageInheritance

vijay Krishnan
Greenhorn

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.

E:\Super.java
=============
public class Super
{
int i=5;
}

D:\Sub.java
===========
package call;
class sub extends Super
{
void print()
{
System.out.println(i);
}
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,
Vijay
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PackageInheritance