[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Originally posted by Stephen Connery:
Thanks Jeanne!
Do you mean like : javac JDate.java JDateTest.java ?
I tried this and got:
JDateTest.java cannot access JDate
bad class file: .\JDate.class
class contains wrong class: com.javaranch.common.JDate
please remove or make sure it appears in the correct subdirectory of the classpath
The JDate class compiles fine on its own.
I know such a simple error must seem daft -thanks for your help
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
please remove or make sure it appears in the correct subdirectory of the classpath
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
So how does the compiler look for classes you wish to import? Can it only see classes in the current directory (and sub-directories) OR those included in the classpath.
Could you tell me whats the difference between the classpath and PATH variables
Run away! Run away! Here, take this tiny ad with you:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
|