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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing a class (super-newbie question)

Status
Not open for further replies.

SH4F33

Programmer
Apr 1, 2005
58
MU
Hello there.Im very new to java programming and maybe wat Im going to ask is very simple. Anyways. Ive just started with java and im using borland jbuilder 2005 as my ide. Ive created a project "bank" whick is in a folder called bank. And my package name's also bank. Ive got a class called Account.class which is in the bank folder.
And Ive created another project in another folder. And I want to import the Account.class to the new project. I tried typing import Account.*; but I dont c the Account in the popup menu.Can anyone help?
Thanks.
 
You also have to specify where to look at all for classes, which is the directory, containing the bank directory, which contains the Account.class.

How that is done with JBuilder is not known by me.
Typically you include that directory in your classpath, but IDEs often like sweet little dialogs to be filled.

seeking a job as java-programmer in Berlin:
 
Ive tried that, but like u're saying, I must let the ide know where to look for the class Account. Well, thats wat im trying to do since saturday. Thanks for the replies.
 
Have you read the manual or help pages for your IDE on how to import packages ?
Have you googled for "import packages JBuilder" ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
if you've got another project and you want to import the Account class into that you will need to import the project containing the class into the new project. you might have to import the entire project or just the classes that the Account class is dependant on. in eclips you would do this in the project librarys and where you would import jar files. as far as i know its a similar process in jbuilder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top