@echo off
java -version>nul 2>nul
if /i not %errorlevel% == 0 (
	@echo You do not have to install jdk, Please install java version 1.8 or higher.
	pause
	exit
)
set VERSION7=7
for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
    set JAVAVER=%%g
)
set JAVAVER=%JAVAVER:"=%
for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
    set CURRENTV=%%w
)

if %CURRENTV% LSS %VERSION7% (
	@echo Your jdk version is too low, Please install java version 1.8 or higher.
	pause
	exit
)

set ITOSS_HOME=%~dp0
@echo on
java -Dosgi.console ^
-Dosgi.nl=zh ^
-Dorg.osgi.service.http.port=8080 ^
-Dosgi.compatibility.bootdelegation=true ^
-Dace.osgi.autoupdate=true ^
-Dproductid=WEADMIN ^
-Dagent.identification.agentid=weadmin_v1.2 ^
-Dagent.discovery.serverurls=http://autop2.weadmin.com/ ^
-Dlaunch.trace=false ^
-Dagent.logging.level=INFO ^
-Dbundles.configuration.location=%ITOSS_HOME%configurations ^
-Declipse.registry.MultiLanguage=true ^
-Djava.awt.headless=true ^
-Xms1024m ^
-Xmx1024m ^
-Xmn512m ^
-XX:PermSize=256m ^
-XX:MaxPermSize=256m ^
-jar weadmin.jar