• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package compilation

 
geeta rai
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've a class "a.java" in the folder d:\practice\com\dan and have a package statement
package com.dan
as the first statement in a.java. I want to put the compiled file in a separate folder d:\practice\classes so i compiled the file as
javac -d classes com\dan\a.java from the "practice" folder.
The file got compiled but two additional folders com and dan were created in classes folder. How can i compile it without creating those additional folders?
Thanks.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Geeta
well, if we create a package then it will create folders you see. Can you let us know the reason why you don't want those folders (com/dan) there?
Regards
Maulin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic