title: Cannot launch spark with Java
body: <p>I get this error everytime I run my application : </p>
  
  <pre><code>SparkConf sparkConf = new SparkConf().setAppName(new String("New app"));
  sparkConf.setMaster("spark://localhost:7077");
  JavaSparkContext sc = new JavaSparkContext(sparkConf);
  
  JavaRDD&lt;String&gt; file = sc.textFile("content/texas.content");
  </code></pre>
  
  <p>The error : </p>
  
  <pre><code>15/01/29 19:45:53 INFO scheduler.TaskSchedulerImpl: Adding task set 1.0 with 2 tasks
  15/01/29 19:46:08 WARN scheduler.TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient memory
  15/01/29 19:46:12 INFO client.AppClient$ClientActor: Connecting to master spark://localhost:7077...
  15/01/29 19:46:12 WARN client.AppClient$ClientActor: Could not connect to akka.tcp://sparkMaster@localhost:7077: akka.remote.EndpointAssociationException: Association failed with [akka.tcp://sparkMaster@localhost:7077]
  15/01/29 19:46:12 WARN client.AppClient$ClientActor: Could not connect to akka.tcp://sparkMaster@localhost:7077: akka.remote.EndpointAssociationException: Association failed with [akka.tcp://sparkMaster@localhost:7077]
  15/01/29 19:46:12 WARN client.AppClient$ClientActor: Could not connect to akka.tcp://sparkMaster@localhost:7077: akka.remote.EndpointAssociationException: Association failed with [akka.tcp://sparkMaster@localhost:7077]
  15/01/29 19:46:12 WARN client.AppClient$ClientActor: Could not connect to akka.tcp://sparkMaster@localhost:7077: akka.remote.EndpointAssociationException: Association failed with [akka.tcp://sparkMaster@localhost:7077]
  15/01/29 19:46:23 WARN scheduler.TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient memory
  </code></pre>
  
  <p>How can I get rid of it?
  Thanks!</p>