File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to compile a java file in a different directory location from the original java directory? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to compile a java file in a different directory location from the original java directory?" Watch "How to compile a java file in a different directory location from the original java directory?" New topic
Author

How to compile a java file in a different directory location from the original java directory?

sunil sains
Greenhorn

Joined: Mar 24, 2009
Posts: 1

Hi Guys...

My .java file has the location, MyName/src/Bean.java.

My question is when I compile this .java file, I want its .class file to be saved automatically in a different location which is, MyName/WEB-INF/classes/newBean/Bean.class
and not in the same location as the .java file

How do I make that happen?
I was wondering if this has got something to do with the package.

Please correct me if I am wrong.

Kindly share your inputs.

Thank you for your time.
Sunil.
Moojid Hamid
Ranch Hand

Joined: Mar 07, 2009
Posts: 120
-d <directory> Specify where to place generated class files
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32654
    
    4
And welcome to JavaRanch
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to compile a java file in a different directory location from the original java directory?
 
Similar Threads
what syntax to compile java clases in subdirectory
A question on setting CLASSPATH on linux
Maven and POM file
Compile with -cp or -classpath
Problems setting PATH environment variable