One possibl approach without big effort i think is, let your application get SparkContext from argument, and instantiate your application inside of Zeppelin notebook with SparkContext that Zeppelin provides.
Or, your application might able to embed Zeppelin with following considerations - include zeppelin-interpreter, zeppelin-zengine, zeppelin-server, zeppelin-web, spark, spark-dependencies as dependency - start ZeppelinServer, NotebookServer and all necessary stuff to use Zeppelin. - need to create interpreter setting programmatically to run Spark interpreter in the same JVM. - Programatically open (initialize) the interpreter and get SparkContext from it - Initialize your application with the SparkContext - whenever you need interactive notebook, you can creates new notebook and use it.
Both approach, the key is make share the same instance of SparkContext between Zeppelin and your application .