1*4bfccde5SXin Li@echo off 2*4bfccde5SXin Lirem Copyright (C) 2008 The Android Open Source Project 3*4bfccde5SXin Lirem 4*4bfccde5SXin Lirem Licensed under the Apache License, Version 2.0 (the "License"); 5*4bfccde5SXin Lirem you may not use this file except in compliance with the License. 6*4bfccde5SXin Lirem You may obtain a copy of the License at 7*4bfccde5SXin Lirem 8*4bfccde5SXin Lirem http://www.apache.org/licenses/LICENSE-2.0 9*4bfccde5SXin Lirem 10*4bfccde5SXin Lirem Unless required by applicable law or agreed to in writing, software 11*4bfccde5SXin Lirem distributed under the License is distributed on an "AS IS" BASIS, 12*4bfccde5SXin Lirem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4bfccde5SXin Lirem See the License for the specific language governing permissions and 14*4bfccde5SXin Lirem limitations under the License. 15*4bfccde5SXin Li 16*4bfccde5SXin Lirem don't modify the caller's environment 17*4bfccde5SXin Lisetlocal 18*4bfccde5SXin Li 19*4bfccde5SXin Lirem Set up prog to be the path of this script, including following symlinks, 20*4bfccde5SXin Lirem and set up progdir to be the fully-qualified pathname of its directory. 21*4bfccde5SXin Liset prog=%~f0 22*4bfccde5SXin Li 23*4bfccde5SXin Lirem Change current directory and drive to where the script is, to avoid 24*4bfccde5SXin Lirem issues with directories containing whitespaces. 25*4bfccde5SXin Licd /d %~dp0 26*4bfccde5SXin Li 27*4bfccde5SXin Lirem Check we have a valid Java.exe in the path. 28*4bfccde5SXin Liset java_exe= 29*4bfccde5SXin Licall lib\find_java.bat 30*4bfccde5SXin Liif not defined java_exe goto :EOF 31*4bfccde5SXin Li 32*4bfccde5SXin Liset jarfile=draw9patch.jar 33*4bfccde5SXin Liset frameworkdir=. 34*4bfccde5SXin Liset libdir= 35*4bfccde5SXin Li 36*4bfccde5SXin Liif exist %frameworkdir%\%jarfile% goto JarFileOk 37*4bfccde5SXin Li set frameworkdir=lib 38*4bfccde5SXin Li 39*4bfccde5SXin Liif exist %frameworkdir%\%jarfile% goto JarFileOk 40*4bfccde5SXin Li set frameworkdir=..\framework 41*4bfccde5SXin Li 42*4bfccde5SXin Li:JarFileOk 43*4bfccde5SXin Li 44*4bfccde5SXin Liset jarpath=%frameworkdir%\%jarfile% 45*4bfccde5SXin Li 46*4bfccde5SXin Licall "%java_exe%" "-Djava.ext.dirs=%frameworkdir%" -jar %jarpath% %* 47