Two Laptop Bag
The moose likes Beginning Java and the fly likes Package quesion? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Package quesion?" Watch "Package quesion?" New topic

Package quesion?

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
I spent about 2 hours to figure out how the packages works in Java.
When I put in the package the source code( and the binary code(MyClass.class) only than it began working.I really don't understand why the source code is needed?
Thanks in advance
Dan Zan

Joined: Mar 07, 2002
Posts: 6
Hi There Mike:
The source code is needed when you run javac, recompiling your code.
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

What does your directory structure look like? and what is the command you're trying to use to run your Java Program?
See if this thread helps you to understand the relationship between packages and directory structures in Java.
this thread might help you to run your program in a package.
[ June 07, 2002: Message edited by: Jessica Sant ]

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
I agree. Here's the link:
subject: Package quesion?
It's not a secret anymore!