+1  A: 

On the webdriver homepage one can read

  • Add $WEBDRIVER_HOME/common/build/webdriver-common.jar to the CLASSPATH
  • Add $WEBDRIVER_HOME/htmlunit/build/webdriver-htmlunit.jar to the CLASSPATH
  • Add all the Jar files under $WEBDRIVER_HOME/htmlunit/lib/runtime to the CLASSPATH

So you have to put all the jar files behind -cp like that

javac -cp /home/iyo/webdriver/common/build/webdriver-common.jar:/home/iyo/webdriver/common/build/webdriver-htmlunit.jar FirstTest.java

You probably have to add all the jar files from htmlunit/lib/runtime to the classpath as well.

I run it exactly with your parameters (+I add JAR from $WEBDRIVER_HOME/htmlunit/lib/runtime) but it has got still same problems.
Perhaps you post the complete line you finally executed then we can see what the problem is.