⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 startsecuritymanagerexploreritem.java

📁 一个agent 工具包,可以开发移动设备应用,考虑了安全措施
💻 JAVA
字号:
package SOMA.utility;

import java.io.*;
import java.util.*;

/** Attiva il <code>SecurityManager</code> standard.
*
* @author Livio Profiri
*/

public class StartSecurityManagerExplorerItem extends SOMA.explorer.ExplorerItem
{
  public StartSecurityManagerExplorerItem()
  {
    super( "Activates the system Security Manager." );
  }

  public Object Execute( Collection Parameters, PrintStream out )
  {
    SecurityManager theSecurityManager = null;

    try
    {
      theSecurityManager = System.getSecurityManager();
      if( theSecurityManager != null )
        out.println( "The Security Manager is ALREADY active."  );
      else
      {
        theSecurityManager = new SecurityManager();
        System.setSecurityManager( theSecurityManager );

        out.println( "Security Manager activated." );
      }
    }
    catch( Exception e )
    {
      e.printStackTrace( out );
    }

    return theSecurityManager;
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -