A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Node.js in Action
this week in the
Programmer Certification (SCJP/OCPJP)
keywords as pkg directory names
Joined: May 28, 2008
Aug 09, 2008 11:26:00
Hey guys. Y'all are probably already aware, but I was surprised enough to share by the fact that I seem not to be allowed to use keywords as package directory names. Anyways, perhaps an insidious
question waiting to happen :-).
francoeur:common mike$ javac -d classes/ src/package/for/common/classes/*.java src/package/for/common/classes/Dog.java:1: <identifier> expected package package.for.common.classes; ^ src/package/for/common/classes/Pack.java:1: <identifier> expected package package.for.common.classes; ^ 2 errors
francoeur:common mike$ javac -d classes/ src/packedge/for/common/classes/*.java src/packedge/for/common/classes/Dog.java:1: <identifier> expected package packedge.for.common.classes; ^ src/packedge/for/common/classes/Pack.java:1: <identifier> expected package packedge.for.common.classes; ^ 2 errors
francoeur:common mike$ javac -d classes/ src/packedge/fer/common/classes/*.java francoeur:common mike$
SCJP 5, SCWCD 5
Joined: Aug 03, 2008
Aug 10, 2008 04:49:00
thanks....this might help in the exam or anywhere else........
SCJP 6 | SCWCD 5 |
Javaranch SCJP FAQ
I agree. Here's the link:
subject: keywords as pkg directory names
How to compile the code on p171?
HFSJ: Error while compiling servlet example
Error Compiling a Servlet
ANT help required
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014