Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
StartRmiServer.java
Package: AdventNetSNMPAPI_4.zip [view]
Upload User: aonuowh
Upload Date: 2021-05-23
Package Size: 35390k
Code Size: 2k
Category:
SNMP
Development Platform:
C/C++
- /* $Id: StartRmiServer.java,v 1.2.2.3 2009/01/28 12:48:53 prathika Exp $ */
- /*
- * @(#)rmigetbulk.java
- * Copyright (c) 1996-2009 AdventNet, Inc. All Rights Reserved.
- * Please read the COPYRIGHTS file for more details.
- */
- import java.io.*;
- public class StartRmiServer
- {
- public static void main(String [] args) {
- Process process ;
- Runtime rt;
- try
- {
- String command =null;
- String command1 =null;
- if( System.getProperty("os.name").endsWith("95"))
- {
- command = "command.com /c "+"rmiregistry";
- command1 = "command.com /c "+"java -Djava.security.policy=SNMPRmi.policy com.adventnet.snmp.rmi.SnmpFactoryImpl";
- }
- else if( System.getProperty("os.name").endsWith("NT"))
- {
- command = "cmd /c "+"rmiregistry";
- command1 = "cmd /c "+"java -Djava.security.policy=SNMPRmi.policy com.adventnet.snmp.rmi.SnmpFactoryImpl";
- }
- else
- {
- command = "rmiregistry";
- command1 = "java -Djava.security.policy=SNMPRmi.policy com.adventnet.snmp.rmi.SnmpFactoryImpl";
- }
- process = Runtime.getRuntime().exec(command);
- // wait for some time till the RMI Registry is done.
- try {
- Thread.sleep(1000);
- } catch (Exception e) {
- System.out.println ("Caught exception:" + e.getMessage());
- }
- System.out.println ("Started RMI Registry");
- // Start the SNMP RMI Factory Impl.
- process = Runtime.getRuntime().exec(command1);
- System.out.println ("Started SNMP RMI Factory Impl. Waiting for requests from RMI Clients");
- }
- catch(java.lang.SecurityException se)
- {
- System.out.println("RMI Server startup unsuccessfull:"+ se.toString());
- }
- catch(IOException ex)
- {
- System.out.println("RMI Server startup unsuccessfull:"+ ex.toString());
- }
- }
- }