Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

instantiating classes in the same portfolio

Status
Not open for further replies.

UHS

Instructor
Mar 26, 2001
4
CA
Java Workshop 2.0
Here's my problem, I have an applet which I want to instantiate another class therein. This class is in the same portfolio, but another project. How can I do this without creating a package?

Leads I have mainly outline the use under the Project/Edit option. Some sort of file reference needs to be placed in either "Included Projects", "Build/additional Class Paths", or "Root Directory of Class Hierarchy". However I don't which one of these it is or what kind of pathname I need ("C:\blah blah, or watnot). If anyone can help I would really appreciate it!
 
Hi,

I am not sure what you meant be same portfolio but I guess it means in the same folder. Maybe you would like to explain further on portfolio.

If that is the case, there isn't a need to create a package or set any paths at all. All you have to do is to just new an instance of the class that you would like to instantiate.

It would be something like having the following sentence in the appropriate part of the Applet program:
Fruits fruit = new Fruits();

Regards,
Leon
 
Oh, in Java Workshop you can create a "portfolio" which is a collection of many folders with programs. Yes, I know how to instantiate from programs in the same folder/project but I wish to know how to do so from the same portfolio.
 
If that is the case, I think it will still be alright to instantiate the same way you do for programs in the same folder or project since the particular .class files are all located in the appropriate folder names which in turn are all included in the portfolio.

Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top