package statement in java files won't run outside of eclipse
I am learning eclipse and java concurrently.
Eclipse puts a package statement at the head of a class file. The class will compile and run inside of eclipse, but I can not run it from the command line (java myclass), although it compiles. I've found that removing the package statement allows the program to compile and run from the command line.
Can make the adjustment, but what is under the hood?
Found answer, still doesn't work
So, where in the sun tutorial do I find this information? Lots of material there, if I only knew where to look. I did go back to the the beginning and found some relevant information, even looked under common problems. Don't mind doing the leg work, but I am asking because I don't know where to look or what I missed the first go around. Finally found the answer in a dated version of "Core Java - Vol. 1" has a fairly comprehensive treatment of packages in chapter 4.
What I finally found out is that CLASSPATH + PACKAGE + somefile.class should evaluate to the location of "somefile.class". If there is a value in CLASSPATH, the current directory -> . <- is needed.
.;g:\workspace\LockObjects\src; is my class path. rdt_LockObj is my package.
Of course, now that I know all the answers, it still doesn't work.
What am I missing?