Sample Code: Launching
// Example code for launching the Motif application 'wsinfo'
import com.sun.management.viper.services.Launch;
import com.sun.management.viper.services.LaunchInfo;
import com.sun.management.viper.services.ServiceList;
...
Launch launcher = (Launch)inf.getServiceByName(ServiceList.LAUNCH);
LaunchInfo wsinfo = new LaunchInfo(
"/usr/openwin/bin/wsinfo", // application path
LaunchInfo.APP_TYPE_XAPP, // type null
null //,
environments );
try {
launcher.launch(wsinfo);
} catch (LaunchException le) {
// problems like command not found, no display
} catch (AuthorizationException ae) {
// current user has no authorization to launch this command
} catch (RemoteException re) {
// Other connection problem
}