anchor.diff:  set PORT_TO_CHECK=9090
   
   set check_port=true
  -set TITLE="MagnetMessaging"
  +set TITLE="MagnetMessage"
   set PROG=mmx-server
   set OPENFIRE_HOME=%CD%\..
   
  
positive.code: 		echo Please check https://java.com/en/download/
  		exit 1
  	)
  	echo java is installed
  
  	endlocal
  goto :eof
  
negative.code: 	call :check_java
  
  	if exist %PROG%.pid (
  		echo.
  		echo Error! Magnet Message server is already running or you have a stale pid file. If Magnet Message server is not running, then please delete mmx-standalone-dist-win\messaging\bin\mmx-server.pid file and try again.
  		exit 1
  	)	
  	call :check_java_home
  	start %TITLE% "%JAVA_HOME%\bin\java" -server -DopenfireHome="%OPENFIRE_HOME%" -jar ..\lib\startup.jar
  	if 0 neq %ERRORLEVEL% (
  		echo Error starting with error code:%ERRORLEVEL%
  		exit 1
  	)
  	timeout /t 3 >nul
  	FOR /F "usebackq tokens=2" %%i IN (`tasklist /nh /fi "WINDOWTITLE eq %TITLE%"`) DO echo %%i > .\%PROG%.pid
  goto :end
  
  