a little confused about packages...
- From: jon23d@xxxxxxxxx
- Date: 29 Jun 2006 00:40:18 -0700
I'm writing a program in an IDE (jbuilder 2005), but when I try to
compile it I get errors about classes not being found. I figure out
that it has something to do with the package, so I test it out using a
smaller version.
Here is what my directory structure looks like:
~/devel/java/TestPkg/TestPkg.java
~/devel/java/TestPkg/TestClass.java
TestPkg.java is:
package TestPkg;
public class TestPkg {
public static void main(String[] args){
System.out.println("Test");
}
}
TestClass.java is:
package TestPkg;
public class TestClass {
TestClass() {
System.out.println("TestClass");
}
}
When I run the compiler everything is fine, but when I try to run it
everything goes nuts! If I remove the package declaration from the
beginning of TestPkg.java then everything works just fine. Is there
some key point I'm missing here???
.
- Follow-Ups:
- Re: a little confused about packages...
- From: Petterson Mikael
- Re: a little confused about packages...
- Prev by Date: Re: ZoneView or ways of dealing with large objects?
- Next by Date: Represent work in progress on std out
- Previous by thread: Java open source..
- Next by thread: Re: a little confused about packages...
- Index(es):
Relevant Pages
|