Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javac command

 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is it that when I compile java files from DOS using the javac command, it ignores my package declarations? It just creates the class files in the same directory.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your package declarations were used to fill the internal class table "package" field. The compiler does not want to have to worry about whether or not you have (yet) implemented the sub-directories in the operating system.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic