run.bat 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. :: <<
  2. :: Davinci
  3. :: ==
  4. :: Copyright (C) 2016 - 2019 EDP
  5. :: ==
  6. :: Licensed under the Apache License, Version 2.0 (the "License");
  7. :: you may not use this file except in compliance with the License.
  8. :: You may obtain a copy of the License at
  9. :: http://www.apache.org/licenses/LICENSE-2.0
  10. :: Unless required by applicable law or agreed to in writing, software
  11. :: distributed under the License is distributed on an "AS IS" BASIS,
  12. :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. :: See the License for the specific language governing permissions and
  14. :: limitations under the License.
  15. :: >>
  16. @echo off
  17. for %%x in ("%JAVA_HOME%") do set JAVA_HOME=%%~sx
  18. for %%x in ("%DAVINCI3_HOME%") do set DAVINCI3_HOME=%%~sx
  19. if "%1" == "start" (
  20. echo start Davinci Server
  21. start "Davinci Server" java -Dfile.encoding=UTF-8 -cp .;%JAVA_HOME%\lib\*;%DAVINCI3_HOME%\lib\*; edp.DavinciServerApplication --spring.config.additional-location=file:%DAVINCI3_HOME%\config\application.yml
  22. ) else if "%1" == "stop" (
  23. echo stop Davinci Server
  24. taskkill /fi "WINDOWTITLE eq Davinci Server"
  25. ) else (
  26. echo please use "run.bat start" or "run.bat stop"
  27. )
  28. pause