I was trying to import a package that was not on the current directly and compiler complained saying "package not found"
Current directly where Demo.java is present = C:/temp
Directly where org.open was present = C:
Then I tried command using -classpath option i.e javac -classpath c: com\hello\Demo.java and the things worked fine.
Now I am wondering why -cp option is used at runtime as mentioned in chapter 1 of OCA8 when compiler checks for the imports at compile time itself?