This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling java file

 
Divya Sanjeev
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a java file -- "Hello.java" 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,
Divya
 
Viktor Kubinec
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
execute this from examples folder :
javac -d classes src/Hello.java
 
Divya Sanjeev
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Viktor.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic