Java ‘Mis’ adventures :) – Stumbling block 1 – Putting class files in different location then the source file

Creating package directory structure and putting class files in different location then the source file:

1. Create a folder structure that suits the purpose and taste. Here is what worked for me: clip_image001

2. “Dir” inside Code_Labs: clip_image002

3. Creates and saved my .java (with package definition as the first line) in the source folder I created inside Code_Labs. clip_image003

4. Compile the code using the following command: clip_image004

5. “Dir” inside Code_Labs again: clip_image005

6. Check that the class files are created inside the path provided in the package structure defined within the source file.

[After 3 hours of huffing and puffing…]

Struggled to execute the code I just took pain to create in a structured way. Thanks to Cameron’s short and simple explanation at , finally got the code to run using the following syntax: