I also do not use maven nor and IDE and run all tests on command line using the standalone jar. Class paths are probably the biggest hurdle, as you will think it's right, but then it fails. Here's my approach:
- Download selenium-server-standalone-2.21.0.jar to folder, let's say it is on the path c:\selenium.
- Open command prompt and cd to the selenium directory.
- Be sure your test file with main class is in this directory as well, let's say it's called Selenium2Example.java like the one in the link you pointed to.
- Compile like so: javac -classpath .;selenium-server-standalone-2.21.0.jar Selenium2Example.java (notice the '.' before the semi-colon, it's necessary, use colons if on linux or mac)
- If no compile errors, then run like so: javac -classpath .;selenium-server-standalone-2.21.0.jar Selenium2Example
Based on the test file you referred, you'll be testing FirefoxDriver. That sample doesn't include the fact that it will check a default location for the FF binary. If it can't find it, it will fail on run. You may need to set your path to the binary in the file first like so System.setProperty("webdriver.firefox.bin","c:\\progra~2\\mozilla\\firefox\\firefox.exe");
Also, I would comment out the findElement and related until you could at least compile, start the WebDriver, get() the url, and quit(). Once you know you can do those, then move to the others.
Hope that helps.