This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Compiling java file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compiling java file " Watch "Compiling java file " New topic

Compiling java file

Divya Sanjeev

Joined: Dec 16, 2009
Posts: 18
Hi All,

I have a java file -- "" in this folder structure D:\examples\src
Also, there is a folder "classes" along with src in the same structure.
My question is, how do I make those .class files to get into "classes" folder using javac -d ??
Please help.

Thanks in advance,
Viktor Kubinec
Ranch Hand

Joined: Jan 28, 2012
Posts: 34
execute this from examples folder :
javac -d classes src/
Divya Sanjeev

Joined: Dec 16, 2009
Posts: 18
Thanks a lot Viktor.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45306
Why have you got that structure inthe first place? Are you using an IDE at this early stage? That is usually a mistake. Make yourself a “java” folder, as described here, and you can make subfolder as required. Using the folder structure from an IDE is a sure-fire recipe for confusion.
I agree. Here's the link:
subject: Compiling java file
jQuery in Action, 3rd edition