@ echo off

rem $Id: startApplicationClient.bat,v 1.1.8.1 2008/07/24 05:18:25 moujie Exp $

rem --- set the JAVA_HOME path to jdk
rem --- if jdk/jre 1.1.x is used, set classpath to swingall.jar also
rem --- refer the documentation if you wish to install standalone client in different machine

cd ..

call .\setEnv.bat

rem Please do not edit this entry, it will be used by the NarUtilities tool
set NARPATH=;./NetMonitor/build/PerformanceGraphs.jar;./NetMonitor/build/RuntimeConfigFrame.jar;./NetMonitor/build/AuthMain.jar;./NetMonitor/build/ConfigPanel.jar;%NMS_CLASSES%\AdventNetUtils.jar;%NMS_CLASSES%\AdventNetMSBeans.jar;%NMS_CLASSES%\GenVarPanel.jar;%NMS_CLASSES%\crimson.jar;%NMS_CLASSES%\jaxp.jar;%NMS_CLASSES%\xalan.jar;./NetMonitor/build/ManagementClient.jar;%NMS_CLASSES%\AdventNetFramework.jar;%NMS_CLASSES%\NmsClientClasses.jar;./NetMonitor/build/IPDSLAM_EMS_Client.jar;%NMS_CLASSES%\log4j.jar

rem Please do not edit this entry, it will be used by the DeploymentWizard tool
set CUSTOMPATH=./classes/ManagementServer.jar

set CLASSPATH=%NMS_CLASSES%;%NMS_ARC%;%SNMP_CLASSPATH%;%JIMI_CLASSPATH%;%XML_CLASSPATH%;%BUILDER_CLASSPATH%;%MS_CLIENT_CLASSPATH%;%TL1_CLASSPATH%;%CLI_CLIENT_CLASSPATH%;%CUSTOMPATH%;%NARPATH%;%NMS_CLASSES%\AdventNetSnmpV3USM.jar;%NMS_CLASSES%\ClientExamples.jar;%NMS_CLASSES%\AdventNetAboutDialog.jar;%NMS_CLASSES%\jnlp.jar;%NMS_CLASSES%\AdventNetCCLLibrary.jar;%NMS_CLASSES%\AdventNetProBeans.jar;%NMS_CLASSES%\AdventNetDMPModels.jar;%NMS_CLASSES%\AdventNetNPrevalent.jar;%NMS_CLASSES%\AdventNetUpdateManagerInstaller.jar;%SUM_CLIENT_CLASSPATH%;%NMS_CLASSES%\jbcl.jar;%NMS_CLASSES%\AdventNetAboutDialog.jar;%NMS_CLASSES%\jacob.jar;%NMS_CLASSES%\AdventNetCLIClient.jar;%NMS_CLASSES%\AdventNetJta.jar;%CUSTOMPATH%


if  "test%1" == "test" goto defaultargs1 

if "test%2" == "test" goto defaultargs2

if not "test%6" == "test" goto defaultargs3

 :start
%JAVA_HOME%\bin\java -Xmx256m com.adventnet.nms.startclient.WebNMSClient %1 %2 %3 %4 %5
set clientexit=%errorlevel%
if %clientexit% NEQ 126 goto end
%JAVA_HOME%\bin\java -Xmx256m -classpath %UPDATE_MANAGER_CLASSPATH% com.adventnet.tools.update.installer.UpdateManager -u conf -h %NMS_HOME% -c
set umexit=%errorlevel%
if %umexit% EQU 0 goto start
goto end

:defaultargs1
 :start
rem --- call WebNMSClient
%JAVA_HOME%\bin\java -Xmx256m com.adventnet.nms.startclient.WebNMSClient localhost 9090
set clientexit=%errorlevel%
if %clientexit% NEQ 126 goto end
%JAVA_HOME%\bin\java -Xmx256m -classpath %UPDATE_MANAGER_CLASSPATH% com.adventnet.tools.update.installer.UpdateManager -u conf -h %NMS_HOME% -c
set umexit=%errorlevel%
if %umexit% EQU 0 goto start
goto end

:defaultargs2
echo "USAGE: startApplicationClient [HOST] [PORT]" 
goto end

:defaultargs3
echo "USAGE: startApplicationClient [HOST] [PORT] [YES/NO] [Language] [Country]"
goto end

:end
cd bin
