Anonymous

How To Compile Java Package Program With -d?

1

1 Answers

Anonymous Profile
Anonymous answered
Compile the program e.g. Hello.java as follows:-

javac -d . Hello.java

Note that this program contain package declarations and classes which is included in that package.

After compilation it will create folders having same name as that of package name & place .class file it in automatically.e.g.If you have defined package shivaji and in that you have defined class tanaji
then after compilation it will create folder name as shivaji.It will place class file tanaji.class into this folder automatically.

Answer Question

Anonymous