I’m looking to create a package called “blue” under the default directory.
So, the package declaration is
package blue;
at the very top of my source code. When I compile the file with
javac This.java
at command prompt, it totally ignores my package declaration
and stores the class files in the default directory. It does this
regardless of whether directory “blue” is there under the default directory.
But when I compile with
javac -d . This.java
it is doing what it is supposed to do– creating the package directory “blue”
under default and storing the class files there. What am I missing ?
Appreciate the help in advance.
From
man javac: