2009-08-06 10 views

答えて

4

判明したとおりです。

5

私はこれをWindowsシステム上で起動するためにこれまでに使ったことがありますが、これはMacでそれを試したことはありません。

public void launchScript(String args) 
{ 
    String cmd = null; 
    try 
    { 
     cmd = getParameter(PARAM_CMD); 
     System.out.println("args value : = " + args); 
     System.out.println("cmd value : = " + cmd); 
     System.out.println("Full command: = " + cmd + " " + args); 
     if (cmd != null && !cmd.trim().equals("")) 
     { 
      if (args == null || args.trim().equals("")) 
      { 
       final String tempcmd = cmd; 
       AccessController.doPrivileged(new PrivilegedAction() { 
       public Object run() { 
       try 
       { 
        Runtime.getRuntime().exec(tempcmd); 
       } 
       catch (Exception e) 
       { 
        System.out.println("Caught exception in privileged block, Exception:" + e.toString()); 
       } 
       return null; // nothing to return 
      } 
      });      
       System.out.println(cmd); 
      } 
      else 
      { 
       final String tempargs = args; 
       final String tempcmd1 = cmd; 
       AccessController.doPrivileged(new PrivilegedAction() { 
        public Object run() 
        { 
         try 
         { 
          Runtime.getRuntime().exec(tempcmd1 + " " + tempargs); 
         } 
         catch (Exception e) 
         { 
          System.out.println("Caught exception in privileged block, Exception:" + e.toString()); 
         } 
         return null; // nothing to return 
        } 
       });       
       System.out.println(cmd + " " + args); 
      } 
     } 
     else 
     { 
      System.out.println("execCmd parameter is null or empty"); 
     } 
    } 
    catch (Exception e) 
    { 
     System.out.println("Error executing command --> " + cmd + " (" + args + ")"); 
     System.out.println(e); 
    } 
} 
0

私が知っているだけで、関連する問題は、Windows Vista上のInternet Explorerの古い「クラシック」プラグインを使用して、アプレットが特に有用であることを停止し、「低整合性」プロセスで実行されたということです。

私の常識は、コードに署名する前に何をしているのかを知ることです。

+0

はい。私は明示的にマックをターゲットにする必要があるので、これは問題ではありません。しかし、よく知っている。 –

+0

OS Xの「シートベルト」はおそらくブラウザに適用され、問題を引き起こす可能性があります。私はAppleがPlugIn 2を採用しているところがどこにあるのかは完全には分かっていない。 –

関連する問題