You are mixing up two things:
- creating a local repository (a MemoryStore persisted to dataDir), and
- a remote repository living on the Sesame server
If you just want to create a persistent repository the first option is sufficient. If you want to also have a full Sesame server with all its UI and services then you have to install it, set it up first and use the second option.
In both cases, you can use the RepositoryManager
API. An introduction to RepositoryManager.
You wouldn't typically start the Sesame server and workbench via Eclipse. You would use a standalone installation as described in the documentation.