SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


imanagermobileproxy
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

imanagermobileproxy [2013/05/12 09:56] (current)
sjoerd created
Line 1: Line 1:
 += iManager Mobile Proxy =
  
 +iManager mobile is a very nice tool which makes it able for you to run iManager on your PC, thus moving some of the load off your server to your workstation. This might be handy in case you're servers are performing poor and you want every cycle and memory bit to be in use for your users, or, as in my case you switch a lot of computers and sites and always want the latest version of iManager and additional plugins to be close to you. There is one thing though, iManager needs plugins which can be installed through the internet. The interface however does not give you an option to provide a proxy server. There is a way however by changing some of the code in the imanager.bat.
 +== iManager.bat ==
 +There is one change you have to, and one you could make. If you only want to use one proxy and nothing else you only have to make one change. If you want to make startup files for different proxies you'll have to make a second one.
 +=== Setting Up the Proxy ===
 +* Go to line 119 and add these parameters:
 +** -Dhttp.proxyHost=10.10.10.10 ​
 +** -Dhttp.proxyPort=8080
 +** -Dhttp.proxyUser=username
 +** -Dhttp.proxyPassword=password
 +=== Setting Up Different Proxies ==
 +If you need to use multiple proxies make copies of the file, and edit each file as needed with the correct proxy settings. After that, change this:
 +* Go to line 12 and change the filename according to the correct filename:
 +** call <color red>​iManager-proxy.bat</​color>​ FIXUP JAVA_HOME "​%JAVA_HOME%\"​ FIXUP WD "​%CD%\"​ %1 %2 %3 %4 %5 %6 %7 %8 %9
 +
 +<code 1>
 +@echo off
 +setlocal
 +cd /d %0\..
 +
 +if defined IMANAGER_HOME cd %IMANAGER_HOME%\bin
 +
 +:FIX_PATH
 +   if not defined CALLED_SELF goto CALL_SELF
 +   goto FIXUP
 +:CALL_SELF
 +   set CALLED_SELF=true
 +   call iManager-proxy.bat FIXUP JAVA_HOME "​%JAVA_HOME%\"​ FIXUP WD "​%CD%\"​ %1 %2 %3 %4 %5 %6 %7 %8 %9
 +   goto DONE
 +:FIXUP
 +   SET FIXPARAM=%1
 +   if not defined FIXPARAM goto FIXUP_DONE
 +   if not %FIXPARAM% == FIXUP goto FIXUP_DONE
 +   shift
 +   set %1=%~sdp2
 +   shift
 +   shift
 +   goto FIXUP
 +:FIXUP_DONE
 +
 +:​CHECK_JAVA_HOME
 +   set JAVA_HOME_BAK=%JAVA_HOME%
 +   set JAVA_HOME=
 +   if not defined JAVA_HOME goto FIX_JAVA_HOME
 +   if %JAVA_HOME% == ""​ goto FIX_JAVA_HOME
 +   goto DONE_JAVA_HOME
 +:​FIX_JAVA_HOME
 +   if NOT EXIST windows\java goto ERROR_JAVA_HOME
 +   set JAVA_HOME=%WD%windows\java
 +   set JAVA_EXE=%JAVA_HOME%%JAVA_EXE%
 +   goto DONE_JAVA_HOME
 +:​ERROR_JAVA_HOME
 +   if defined JAVA_HOME_BAK goto RESET_JAVA_HOME
 +   echo '
 +   echo ERROR!! The JAVA_HOME environment variable must be defined to point to a valid JDK.
 +   echo See the documentation for more details.
 +   echo '
 +   goto DONE_ERROR
 +:​RESET_JAVA_HOME
 +   set JAVA_HOME=%JAVA_HOME_BAK%
 +:​DONE_JAVA_HOME
 +
 +set JAVA_EXE=%JAVA_HOME%\bin\javaw
 +set SHOW_VAR=%1
 +
 +:​SET_DEBUG_OUTPUT
 +   if not defined SHOW_VAR goto DONE_SET_DEBUG_OUTPUT
 +   if /i %SHOW_VAR% NEQ ShowTomcatOutput goto DONE_SET_DEBUG_OUTPUT
 +   set JAVA_EXE=%JAVA_HOME%\bin\java
 +:​DONE_SET_DEBUG_OUTPUT
 +
 +:​CHECK_VALID_JDK
 +   if NOT EXIST %JAVA_HOME%\lib\tools.jar goto ERROR_VALID_JDK
 +   goto DONE_VALID_JDK
 +:​ERROR_VALID_JDK
 +   echo '
 +   echo ERROR!! The JAVA_HOME environment variable is not set to a full valid JDK.
 +   echo See the documentation for more details.
 +   echo '
 +   goto DONE_ERROR
 +:​DONE_VALID_JDK
 +
 +:SET_VAR
 +   set CLASSPATH=%JAVA_HOME%\lib\tools.jar
 +   set CLASSPATH=%CLASSPATH%;​bootstrap.jar
 +   set CLASSPATH=%CLASSPATH%;​windows\swt.jar
 +   set CLASSPATH=%CLASSPATH%;​iManBootstrap.jar
 +
 +   set SWT_LIB_PATH=%WD%windows
 +   set NATIVE_LIB_PATH=%WD%..\tomcat\webapps\nps\WEB-INF\bin\windows
 +   set PATH=%NATIVE_LIB_PATH%;​%SWT_LIB_PATH%;​%PATH%
 +
 +   set MAIN_CLASS=com.novell.emframe.bootstrap.iManagerBootstrap
 +   set NICI_INSTALL_FILE=..\NICI\windows\wcniciu0.exe
 +   set NICI_DLL_FILE=%SYSTEMROOT%\system32\ccsw32.dll ​  
 +
 +   set CLASSPATH=%CLASSPATH%;​%SWT_LIB_PATH%\swt.jar
 +   set CLASSPATH=%CLASSPATH%;​%WD%..\tomcat\bin\commons-logging-api.jar
 +   set CLASSPATH=%CLASSPATH%;​%WD%..\tomcat\bin\jmx.jar
 +
 +   set BPATH=%WD%..\tomcat\common\endorsed\xercesImpl.jar
 +   set BPATH=%BPATH%;​%WD%..\tomcat\common\endorsed\xml-apis.jar
 +   
 +   set EPATH=%WD%..\tomcat\common\endorsed
 +
 +:DONE_VAR
 +
 +:CHECK_NICI
 +   if not exist "​%NICI_DLL_FILE%"​ goto INSTALL_NICI
 +   goto DONE_NICI
 +:​INSTALL_NICI
 +   echo '
 +   echo Novell iManager requires NICI to be installed on the computer.
 +   echo NICI will be installed.
 +   echo Novell iManager will be started when the NICI installation has been completed.
 +   ​%NICI_INSTALL_FILE%
 +   echo '
 +:DONE_NICI
 +
 +:​START_IMANAGER
 +:: echo.
 +:: echo EPATH = %EPATH%
 +:: echo BPATH = %BPATH%
 +:: echo CLASSPATH = %CLASSPATH%
 +:: echo.
 +echo Running Novell iManager
 +:: echo.
 +:: echo %JAVA_EXE% -server -Xbootclasspath/​a:​%BPATH%
 +:: echo -Djava.endorsed.dir=%EPATH%
 +:: echo -Djava.library.path=%NATIVE_LIB_PATH%;​%SWT_LIB_PATH% ​
 +:: echo %DEBUG_PARAMS% %MAIN_CLASS% %1 %2 %3 %4 %5 %6 %7 %8 %9
 +:: echo.
 +
 +windows\mozilla\xulrunner --register-user
 +start %JAVA_EXE% -Xms256m -Xmx512m -Xbootclasspath/​a:​%BPATH% -cp %CLASSPATH% -Djava.endorsed.dir=%EPATH% -Djava.library.path=%NATIVE_LIB_PATH%;​%SWT_LIB_PATH% -Dhttp.proxyHost=10.10.10.10 -Dhttp.proxyPort=8080 %DEBUG_PARAMS% %MAIN_CLASS% %1 %2 %3 %4 %5 %6 %7 %8 %9
 +
 +goto DONE
 +
 +:DONE_ERROR
 +pause
 +
 +:DONE
 +
 +endlocal
 +</​code>​
 +
 +== Notes ==
 +These setting might also work for the startup files on netware or linux, but I've never tried it.
 +
 +{{tag>​network netware}}
imanagermobileproxy.txt ยท Last modified: 2013/05/12 09:56 by sjoerd