| Author |
package???
|
mei l.h.
Greenhorn
Joined: Nov 12, 2002
Posts: 11
|
|
What does this code do? Does the compiler create the new floders in the current location on your hard disk to place the class New?
|
MM
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
|
If, from the command line, you were to simply execute javac New.java, then the class file would be compiled, but no directory structure would be created by the compiler and the compiled class file would be placed in the current working directory. The command javac -d . New.java would create a directory structure in the current working that matched the package declaration and place the compiled class file in the appropriate subdirectory. Take a look at The javac Documentation for more information/details concerning the d and other switches available for use with javac.
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
Andrew Fischer
Greenhorn
Joined: Nov 18, 2002
Posts: 21
|
|
That code should generate a compiler error. You should fully specify the package name like this. I always make the directories first. I'm not sure what happens if you don't. [ November 25, 2002: Message edited by: Andrew Fischer ]
|
Andrew Fischer<br />SCJP
|
 |
mei l.h.
Greenhorn
Joined: Nov 12, 2002
Posts: 11
|
|
|
thanks
|
 |
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9001
|
|
mei l.h. Again, Initials are not a last name. Please change your displayed "last name" to comply with our naming policy. "firstName lastName" Thank you for your co-operation.
|
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
|
 |
 |
|
|
subject: package???
|
|
|