Re: a little confused about packages...
- From: Petterson Mikael <mikael.petterson@xxxxxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 10:05:00 +0200
jon23d@xxxxxxxxx wrote:
I'm writing a program in an IDE (jbuilder 2005), but when I try toHi,
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???
What do you type to run it?
cheers,
//mikael
.
- Follow-Ups:
- Re: a little confused about packages...
- From: jon23d
- Re: a little confused about packages...
- References:
- a little confused about packages...
- From: jon23d
- a little confused about packages...
- Prev by Date: Represent work in progress on std out
- Next by Date: Re: Represent work in progress on std out
- Previous by thread: a little confused about packages...
- Next by thread: Re: a little confused about packages...
- Index(es):
Relevant Pages
|