public static void reset() {
   rootStore = RootCertStore.getCertStore();
   sslRootStore = SSLRootCertStore.getCertStore();
   permanentStore = DeploySSLCertStore.getCertStore();
   sessionStore = new SessionCertStore("x509Extended7");
   deniedStore = new DeniedCertStore();
   alwaysShow = Config.getBooleanProperty("deployment.security.https.warning.show");
   mismatchShow = Config.getBooleanProperty("deployment.security.jsse.hostmismatch.warning");
   if (Config.getBooleanProperty("deployment.security.browser.keystore.use")) {
     Service localService = ServiceManager.getService();
     browserSSLRootStore = localService.getBrowserSSLRootCertStore();
     isBrowserSSLRootStoreLoaded = false;
   }
 }
  private void initComponents(String appTitle, boolean doDesktop, boolean doMenu) {
    Object messages[] = new Object[2];
    JButton buttons[] = new JButton[3];

    buttons[0] = new JButton(ResourceManager.getString("install.yesButton"));
    buttons[0].setMnemonic(ResourceManager.getVKCode("install.yesMnemonic"));
    final JButton yesButton = buttons[0];

    buttons[1] = new JButton(ResourceManager.getString("install.noButton"));
    buttons[1].setMnemonic(ResourceManager.getVKCode("install.noMnemonic"));
    final JButton noButton = buttons[1];

    buttons[2] = new JButton(ResourceManager.getString("install.configButton"));
    buttons[2].setMnemonic(ResourceManager.getVKCode("install.configMnemonic"));
    final JButton configureButton = buttons[2];

    int i;
    for (i = 0; i < 3; i++) {
      buttons[i].addActionListener(
          new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
              JButton b = (JButton) ae.getSource();
              if (b == configureButton) {
                Main.launchJavaControlPanel("advanced");
                return;
              }
              if (b == yesButton) {
                _answer = Config.SHORTCUT_YES;
              } else if (b == noButton) {
                _answer = Config.SHORTCUT_NO;
              }
              Component source = (Component) ae.getSource();
              JDialog dialog = null;

              // Iterate through container to find JDialog
              while (source.getParent() != null) {
                if (source instanceof JDialog) {
                  dialog = (JDialog) source;
                }
                source = source.getParent();
              }

              if (dialog != null) {
                dialog.setVisible(false);
              }
            }
          });
    }

    String message = null;

    if (Config.getOSName().equalsIgnoreCase("Windows")) {
      // windows platform
      if (doDesktop && doMenu) {
        message = ResourceManager.getString("install.windows.both.message", appTitle);
      } else if (doDesktop) {
        message = ResourceManager.getString("install.desktop.message", appTitle);
      } else if (doMenu) {
        message = ResourceManager.getString("install.windows.menu.message", appTitle);
      }
    } else {
      // unix platform GNOME
      if (doDesktop && doMenu) {
        message = ResourceManager.getString("install.gnome.both.message", appTitle);
      } else if (doDesktop) {
        message = ResourceManager.getString("install.desktop.message", appTitle);
      } else if (doMenu) {
        message = ResourceManager.getString("install.gnome.menu.message", appTitle);
      }
    }

    setOptions(buttons);
    setMessage(message);
    setMessageType(JOptionPane.WARNING_MESSAGE);
    setInitialValue(buttons[0]);
  }
  private Object openLockFileObject(int paramInt1, String paramString, int paramInt2, boolean paramBoolean1, boolean paramBoolean2)
    throws IOException
  {
    int i = paramInt2 == 0 ? 1 : 0;
    boolean bool = paramString.equals("r");
    SyncAccess.Lock localLock = this.fileAccSync.lock(bool ? 2 : 4);
    Object localObject1 = null;
    try
    {
      while (null == localObject1)
      {
        if (paramBoolean1)
          localObject1 = AccessController.doPrivileged(new PrivilegedAction(paramInt1, paramString, paramBoolean2)
          {
            private final int val$type;
            private final String val$mode;
            private final boolean val$fopt1;

            public Object run()
            {
              Object localObject = null;
              try
              {
                switch (this.val$type)
                {
                case 1:
                  localObject = new RandomAccessFile(SyncFileAccess.this.file, this.val$mode);
                  break;
                case 2:
                  localObject = new FileInputStream(SyncFileAccess.this.file);
                  break;
                case 3:
                  localObject = new FileOutputStream(SyncFileAccess.this.file.getPath(), this.val$fopt1);
                  break;
                default:
                  throw new InternalError("wrong fobj type: " + this.val$type);
                }
              }
              catch (FileNotFoundException localFileNotFoundException)
              {
                Trace.ignoredException(localFileNotFoundException);
              }
              return localObject;
            }
          });
        else
          try
          {
            switch (paramInt1)
            {
            case 1:
              localObject1 = new RandomAccessFile(this.file, paramString);
              break;
            case 2:
              localObject1 = new FileInputStream(this.file);
              break;
            case 3:
              localObject1 = new FileOutputStream(this.file.getPath(), paramBoolean2);
              break;
            default:
              throw new InternalError("wrong fobj type: " + paramInt1);
            }
          }
          catch (FileNotFoundException localFileNotFoundException)
          {
            Trace.ignoredException(localFileNotFoundException);
          }
        if (null == localObject1)
          throw new FileNotFoundException("index file not found");
        if (!Config.isJavaVersionAtLeast14())
        {
          if (localObject1 != null)
          {
            localObject2 = FObjLock.createFObjLock(paramInt1, localObject1, localLock);
            return localObject2;
          }
          localObject2 = null;
          return localObject2;
        }
        Object localObject2 = null;
        switch (paramInt1)
        {
        case 1:
          localObject2 = ((RandomAccessFile)localObject1).getChannel();
          break;
        case 2:
          localObject2 = ((FileInputStream)localObject1).getChannel();
          break;
        case 3:
          localObject2 = ((FileOutputStream)localObject1).getChannel();
          break;
        default:
          throw new InternalError("wrong fobj type: " + paramInt1);
        }
        if (!((FileChannel)localObject2).isOpen())
        {
          localObject2 = null;
          localObject1 = null;
          if ((i == 0) && (paramInt2 <= 0))
            throw new IOException("index file could not be opened, timeout reached");
          Trace.println("SyncFileAccess.openLock: index file not opened, remaining TO : " + paramInt2, TraceLevel.NETWORK);
          try
          {
            if (i == 0)
            {
              Thread.sleep(paramInt2);
              paramInt2 -= 100;
            }
            else
            {
              Thread.sleep(100L);
            }
          }
          catch (Exception localException1)
          {
          }
          continue;
        }
        try
        {
          FileLock localFileLock = null;
          while (localFileLock == null)
            try
            {
              localFileLock = ((FileChannel)localObject2).lock(0L, 9223372036854775807L, bool);
            }
            catch (OverlappingFileLockException localOverlappingFileLockException)
            {
              if ((i == 0) && (paramInt2 <= 0))
                throw new IOException("handled OverlappingFileLockException, timeout reached", localOverlappingFileLockException);
              Trace.println("SyncFileAccess.openLock: handled OverlappingFileLockException, remainint TO : " + paramInt2, TraceLevel.NETWORK);
              try
              {
                if (i == 0)
                {
                  Thread.sleep(paramInt2);
                  paramInt2 -= 100;
                }
                else
                {
                  Thread.sleep(100L);
                }
              }
              catch (Exception localException3)
              {
              }
              localFileLock = null;
            }
            catch (IOException localIOException)
            {
              localObject1 = null;
              Object localObject3 = null;
              if (localObject1 == null)
                localLock.release();
              return localObject3;
            }
        }
        catch (ClosedChannelException localClosedChannelException)
        {
          localObject2 = null;
          localObject1 = null;
          if ((i == 0) && (paramInt2 <= 0))
            throw new IOException("handled ClosedChannelException, timeout reached", localClosedChannelException);
          Trace.println("SyncFileAccess.openLock: handled ClosedChannelException, remaining TO: " + paramInt2, TraceLevel.NETWORK);
          try
          {
            if (i == 0)
            {
              Thread.sleep(paramInt2);
              paramInt2 -= 100;
            }
            else
            {
              Thread.sleep(100L);
            }
          }
          catch (Exception localException2)
          {
          }
        }
      }
    }
    finally
    {
      if (localObject1 == null)
        localLock.release();
    }
    if (localObject1 != null)
      return FObjLock.createFObjLock(paramInt1, localObject1, localLock);
    return null;
  }