How to set path to geckodriver

Download and set path to the geckodriver.exe.
What to do if you run your tests and see "java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property"
+