Er, how exactly do you wish to do this?
Are you planning to drag and drop jar files on to it?
Do you wish to just type "foo.jar" to execute foo.jar?
Do you wish to type "j foo" to execute foo.jar?
To answer your specific question, use system() or an OS-specific function. There might be a better way to do what you want, though.
Just run it with "javaw"
...or make a simple shell/batch, Perl, Python, ... (you get the idea) script. This problem is overkill for an executable program, but yea, you would do it with "system".