• Post Reply Bookmark Topic Watch Topic
  • New Topic

K&B 6 book Page 792  RSS feed

 
appu sharma
Ranch Hand
Posts: 104
Java Netbeans IDE Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This command
javac -d ../classes com/wickedlysmart/MyClass.java
Put the .class file in classes or wickedlysmart directory???
when i run this command the i got my .class file in classes directory not in wicledlysmart.
so anyone can clarify this???
reference Page 792(K&B 6)
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checkout this, it says
-d directory
Set the destination directory for class files. The destination directory must already exist; javac will not create the destination directory. If a class is part of a package, javac puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify -d c:\myclasses and the class is called com.mypackage.MyClass, then the class file is called c:\myclasses\com\mypackage\MyClass.class.

If -d is not specified, javac puts the class file in the same directory as the source file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!