netbeans project layout

Discussion in 'Java' started by David A. Osborn, May 14, 2005.

  1. 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.
    David A. Osborn, May 14, 2005
    #1
    1. Advertising

  2. David A. Osborn

    LDB Guest

    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

    David A. Osborn wrote:
    > 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.
    >
    >
    >
    LDB, May 15, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pimousse
    Replies:
    2
    Views:
    3,632
    Roedy Green
    Apr 21, 2004
  2. Ilias Lazaridis
    Replies:
    0
    Views:
    907
    Ilias Lazaridis
    Dec 12, 2004
  3. Replies:
    1
    Views:
    571
    John Timney \(MVP\)
    Jun 19, 2006
  4. Thomas G. Marshall
    Replies:
    2
    Views:
    825
    Thomas G. Marshall
    Oct 16, 2006
  5. gc
    Replies:
    0
    Views:
    2,867
Loading...

Share This Page