Win a copy of Functional Reactive Programming this week in the Other Languages 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
Pie
Posts: 50215
79
  • 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