Rather than getting these from a jar file I'd just look at the current classpath and search for `org.apache.spark` classes:

You can follow the code here:
http://dzone.com/snippets/get-all-classes-within-package