I have a java app that displays a slideshow.
Some of the files are movies instead of photos.
When a movie comes to be displayed the action depends upon the OS.
On Mac OS X it calls exec() VLC to play the movie. This works, but...

VLC displays behind my App. OK so I add --video-on-top to VLC command line. Movie now visible but VLC is still a background process (key presses go to my app while movie is playing).

I want keypresses to go to VLC until the video finishes (then VLC quits automatically).

How can I use exec to launch a (Mac OS X bundle app) in the foreground?