anchor.diff:  rem ---------------------------------------------------------------------------
   
   rem ----- if JAVA_HOME is not set we're not happy ------------------------------
  -
  -set BASE_DIR=%CD%
   :checkJava
   
   if "%JAVA_HOME%" == "" goto noJavaHome
  
positive.code: :runServer
  cd %CARBON_HOME%
  
  FOR %%C in ("%CARBON_HOME%\resources\editor\services\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\resources\editor\services\%%~nC%%~xC"
  
  rem ---------- Add jars to classpath ----------------
  
  rem set CARBON_CLASSPATH=.\bin\bootstrap;%CARBON_CLASSPATH%
  
  set JAVA_ENDORSED=".\bin\bootstrap\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"
  
  set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError
  -XX:HeapDumpPath="%CARBON_HOME%\logs\heap-dump.hprof"  -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH%
  %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED%  -Dsp.home="%CARBON_HOME%"  -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -Deditor.port=9091 -DenableCloud=false -Dworkspace.port=8289
  
  :runJava
  "%JAVA_HOME%\bin\java" %CMD_LINE_ARGS% org.wso2.stream.processor.tooling.service.workspace.app.WorkspaceServiceRunner
  %CMD%
  if "%ERRORLEVEL%"=="121" goto runJava
  :end
  goto endlocal
  
negative.code: 
  rem find CARBON_HOME if it does not exist due to either an invalid value passed
  rem by the user or the %0 problem on Windows 9x
  if not exist "%CARBON_HOME%\bin\kernel-version.txt" goto noServerHome
  
  goto updateClasspath
  
  