1@rem Licensed to the Apache Software Foundation (ASF) under one or more 2@rem contributor license agreements. See the NOTICE file distributed with 3@rem this work for additional information regarding copyright ownership. 4@rem The ASF licenses this file to You under the Apache License, Version 2.0 5@rem the "License"); you may not use this file except in compliance with 6@rem the License. You may obtain a copy of the License at 7@rem 8@rem http://www.apache.org/licenses/LICENSE-2.0 9@rem 10@rem Unless required by applicable law or agreed to in writing, software 11@rem distributed under the License is distributed on an "AS IS" BASIS, 12@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13@rem See the License for the specific language governing permissions and 14@rem limitations under the License. 15 16@ECHO OFF 17 18SETLOCAL 19SET MODULES=%~dp0.. 20 21IF DEFINED LAUNCH_CMD GOTO testing 22REM Windows 'start' command takes the first quoted argument to be the title of the started window. Since we 23REM quote the LAUNCH_CMD (because it can contain spaces), it misinterprets it as the title and fails to run. 24REM force the window title here. 25SET LAUNCH_START=start "Lucene Luke" 26SET LAUNCH_CMD=javaw 27SET LAUNCH_OPTS= 28goto launch 29 30:testing 31REM For distribution testing we don't use start and pass an explicit java command path, 32REM This is required because otherwise we can't block on luke invocation and can't intercept 33REM the return status. We also force UTF-8 encoding so that we don't have to interpret the output in 34REM an unknown local platform encoding. 35SET LAUNCH_START= 36SET LAUNCH_OPTS=-Dfile.encoding=UTF-8 37 38:launch 39%LAUNCH_START% "%LAUNCH_CMD%" %LAUNCH_OPTS% --module-path "%MODULES%\modules;%MODULES%\modules-thirdparty" --module org.apache.lucene.luke %* 40SET EXITVAL=%errorlevel% 41EXIT /b %EXITVAL% 42ENDLOCAL 43