Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package quesion?

 
Mike Shn
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I spent about 2 hours to figure out how the packages works in Java.
When I put in the package the source code(MyClass.java) 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
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There Mike:
The source code is needed when you run javac, recompiling your code.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic