When you are trying to run SPARQL query examples from the command-line, JENA complains you of JENAROOT not set. You can easily set the path either on the local command prompt window or on the system variables.
1. Set the path
C:\>set JENAROOT=C:\Users\PATH_TO_WHERE_YOU_HAVE_INSTALLED_OR_UNZIPPED_JENA
2. Verify if the path is set correctly
C:\>echo %JENAROOT%
3. You have solved your problem!
The snapshot of my command terminal is below:




