java - Simple clarification on javac command -


i studying ant scripts in java reading hello world tutorial: http://ant.apache.org/manual/tutorial-helloworldwithant.html

in previous tutorial create new directory dos md src command (mkdir in linux)

then put following simple code into: src\oata\helloworld.java:

package oata;  public class helloworld {     public static void main(string[] args) {         system.out.println("hello world");     } } 

now compile shell statment:

md build\classes javac -sourcepath src -d build\classes src\oata\helloworld.java java -cp build\classes oata.helloworld 

i know javac compile classess line?

javac -sourcepath src -d build\classes src\oata\helloworld.java 

i think sayng javac src sources class compile, -d build\classes path put compiled class

but means final: src\oata\helloworld.java?

tnx

andrea

it means filename(s) compile.

the purpose of -sourcepath option tell compiler source files dependent classes may found. doesn't imply in directory should compiled.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -