I would like to restrict my Eclipse-RCP application to a single instance. By this, I mean that once a user opens the application for the first time, it listens on a port and
Basically you can have functionality like eclipse. Eclipse maintains a .lock
file to lock the workspace. You can similarly create an empty .lock
file in your workspace.
On starting every instance, you should check if .lock
file is present and then proceed further accordingly. If file is not present you should create it so that other instance will find that workspace is locked.