--- Jonathan  Boutelle <[EMAIL PROTECTED]> wrote:

> com.rsx.A.B.file two.java should have
> 
> "import com.rsz.A.B.C.file three"
> 
> The package statement for each file should reflect
> the package it is 
> actually a member of:
> (e.g. for  file two, com.rsz.A.B, etc.)
> 
> Hope that helps,
> -J
hi i got this...
------------------CLASS_A--------------------------
import b.*;


class  A

{
        public static void main(String args[])
        {
                System.out.println(">In a");
                B bob=new B();


        }
}

------------------CLASS_A--------------------------

||||||||||||||||||CLASS_B|||||||||||||||||||||||||||

package b;

import c.*;

public class  B

{
        public B()
        {
                System.out.println(">In b");

                        C.test();

        }
}


||||||||||||||||||CLASS_B|||||||||||||||||||||||||||

******************CLASS_C***************************
package c;
 
public class  C

{
        public static void test()
        {
                        System.out.println("in c");
        }
        
}

******************CLASS_C***************************

apologies for modifying the original assumed example
from one.two,three to A,B,C

the directory hierarchy goes like this..
Top most directory a has directory b and file A.java
Next directory b has directory c and file B.java
the final directory c has file C.java

                           a
                          / \
                         b  A.java
                        / \
                       c  B.java
                      /
                    C.java

small letters are directories.

i get the following at runtime...

==================RUNTIME======================
>In a
>In b
java.lang.NoClassDefFoundError: c/C
        at b.B.<init>(B.java:12)
        at A.main(A.java:10)
Exception in thread "main" 
Output completed (0 sec consumed) - Normal Termination
==================RUNTIME======================

kindly help and point any (silly)mistake.

thanks & regards,
rohit.

=====
NAMASTE, i honour the spirit in you which is also in me.
```````````````````````````````````````````````````````
http://www.geocities.com/rohitsz2

|Anytime you feel i need to understand| 
|a concept before i am eligible to get|
|an answer i would be happy to know.  |
^*************************************^


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

_______________________________________________
Java mailing list
[email protected]
http://mail.jug-delhi.org/mailman/listinfo/java_jug-delhi.org

Reply via email to