File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Package compilation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Package compilation" Watch "Package compilation" New topic

Package compilation

geeta rai
Ranch Hand

Joined: Sep 18, 2003
Posts: 48
I've a class "" in the folder d:\practice\com\dan and have a package statement
package com.dan
as the first statement in 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\ 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?
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1873
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?
I agree. Here's the link:
subject: Package compilation
It's not a secret anymore!