netbeans project layout

D

David A. Osborn

I'm working on a project called Mail in netbeans that has two .java files,
one called Mail, and the other called eProfiles with a class called
eProfiles that has a static function in it that I want to call from Mail.
How do I reference the function in the Mail class? I tried
eProfiles.myfunction(), but netbeans marks that as an error as symbol
undefined, unless I have both classes with package mail; at the top. If I
do this though I get a runtime exception of classnotfound: mail. I guess
I'm just not sure how to layout this project so that Mail can use eProfile.
 
L

LDB

First you have Instantied the class eProfiles like the following ...

eProfiles ep = new eProfiles(.. , ..);

Then, depending on if you are using the package directive you have to
import the package if it is in a different path than in Mail.

LDB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,771
Messages
2,569,587
Members
45,097
Latest member
RayE496148
Top