Confused about how packages work.
- From: JoshRountree@xxxxxxxxx
- Date: 29 Jan 2006 21:37:58 -0800
Say I have these two classes, in separate files, MyTest.java,
MyOtherTest.java
package edu.newpack.test
class MyTest {
MyOtherTest mOT;
MyTest() {
}
}
package edu.newpack.test
class MyOtherTest {
MyOtherTest() {
}
}
When I compile MyTest.java with javac MyTest.java in the directory
where both are located why does it say it cannot find MyOtherTest.java
..
Both files are in c:\sources\edu\newpack\test\
I can compile MyOtherTest.java just fine. If I import the package I
don't get the symbol not found error, but I thought if both classes
were in the same package I didn't have to import anything.
thanks
.
- Follow-Ups:
- Re: Confused about how packages work.
- From: Stefan Schulz
- Re: Confused about how packages work.
- From: Roedy Green
- Re: Confused about how packages work.
- Prev by Date: Re: some help required : applets blinded
- Next by Date: Re: Confused about how packages work.
- Previous by thread: sorry .09 instead of .08
- Next by thread: Re: Confused about how packages work.
- Index(es):