本文整理匯總了Java中org.gudy.azureus2.platform.PlatformManager.createProcess方法的典型用法代碼示例。如果您正苦於以下問題:Java PlatformManager.createProcess方法的具體用法?Java PlatformManager.createProcess怎麽用?Java PlatformManager.createProcess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.gudy.azureus2.platform.PlatformManager
的用法示例。
在下文中一共展示了PlatformManager.createProcess方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createProcess
import org.gudy.azureus2.platform.PlatformManager; //導入方法依賴的package包/類
public void
createProcess(
String command_line )
throws PluginException
{
try{
// we need to spawn without inheriting handles
PlatformManager pm = PlatformManagerFactory.getPlatformManager();
pm.createProcess( command_line, false );
}catch(Throwable e) {
Debug.printStackTrace(e);
try{
Runtime.getRuntime().exec( command_line );
}catch( Throwable f ){
throw( new PluginException("Failed to create process", f ));
}
}
}
示例2: win32NativeRestart
import org.gudy.azureus2.platform.PlatformManager; //導入方法依賴的package包/類
private boolean
win32NativeRestart(
PrintWriter log,
String exec )
{
try{
// we need to spawn without inheriting handles
PlatformManager pm = PlatformManagerFactory.getPlatformManager();
pm.createProcess( exec, false );
return( true );
}catch(Throwable e) {
e.printStackTrace(log);
return( false );
}
}
示例3: createProcess
import org.gudy.azureus2.platform.PlatformManager; //導入方法依賴的package包/類
public void
createProcess(
String command_line )
throws PluginException
{
try{
// we need to spawn without inheriting handles
PlatformManager pm = PlatformManagerFactory.getPlatformManager();
if ( pm.hasCapability( PlatformManagerCapabilities.CreateCommandLineProcess )){
pm.createProcess( command_line, false );
return;
}
}catch( Throwable e ){
Debug.printStackTrace(e);
}
try{
Runtime.getRuntime().exec( command_line );
}catch( Throwable f ){
throw( new PluginException("Failed to create process", f ));
}
}