Here's a tutorial that covers how to do this in an RCP app.
http://www.weheartcode.com/2008/08/27/eclipselink-in-j2se-rcp-applications/