added convenient method to create JavaSparkContext