File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Reading Chapter 10 to Grasp Chapter 1 public, protected, private mechanisms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Reading Chapter 10 to Grasp Chapter 1 public, protected, private mechanisms" Watch "Reading Chapter 10 to Grasp Chapter 1 public, protected, private mechanisms" New topic
Author

Reading Chapter 10 to Grasp Chapter 1 public, protected, private mechanisms

Sandra Bachan
Ranch Hand

Joined: Feb 18, 2010
Posts: 434
Hello,

I'm reading Sierra/Bates and to understand the public, protected, private mechanisms used across multiple files in multiple packages, I am interested in understanding how to compile multiple files. Since I am unable to grasp this concept at Chapter 10, I studied several links, one of which is:

http://javaworkshop.sourceforge.net/chapter3.html

I followed the directions for creating and compiling the file, even using the same directory structure. When I type in the following command to compile:



I get this:



What does this error mean?

Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

This error means that the directory path you gave doesn't exists. Are you executing this command from the parent directory of src directory i.e. test directory?? And did you properly place the java files in the test/src/com/mycompany/myproject/ directory??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Sandra Bachan
Ranch Hand

Joined: Feb 18, 2010
Posts: 434
Gosh, that was pretty obvious

I guess I was confusing this with setting up packages, i.e. I was under the impression that I had to create a path test/src/com/example/graphic, but no, the class files will go into test/classes/com/example/graphic, while the source files go under test/src/com/mycompany/myproject

When the .java files get compiled using the command in the common test directory, the class files go under /classes/.../graphic.


Wow, I've been ruminating over this all week!

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading Chapter 10 to Grasp Chapter 1 public, protected, private mechanisms
 
Similar Threads
HFSJ page 85
HF: JSP & Servlets, compiling on Windows
HF: JSP & Servlets (Can't compile my first class on Windows)
urgent help please (creating jar file using ant)
knb page# 793 doubt.