-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.cmd
39 lines (26 loc) · 786 Bytes
/
run.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@REM ----------------------------------------------------------------------------
@REM LineServer Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JVM home dir
@REM ----------------------------------------------------------------------------
@echo off
@setlocal
set ERROR_CODE=0
if not "%JAVA_HOME%" == "" goto OkJHome
echo Error: JAVA_HOME not found in your environment. >&2
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo Error: JAVA_HOME is set to an invalid directory. >&2
goto error
:init
SET JAVA_EXE="%JAVA_HOME%\bin\java.exe"
%JAVA_EXE% -jar target\line-server-0.0.1-SNAPSHOT.jar %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
exit /B %ERROR_CODE%