dx.bat revision 2ad60cfc28e14ee8f0bb038720836a4696c478ad
1@echo off
2REM Copyright (C) 2007 The Android Open Source Project
3REM
4REM Licensed under the Apache License, Version 2.0 (the "License");
5REM you may not use this file except in compliance with the License.
6REM You may obtain a copy of the License at
7REM
8REM     http://www.apache.org/licenses/LICENSE-2.0
9REM
10REM Unless required by applicable law or agreed to in writing, software
11REM distributed under the License is distributed on an "AS IS" BASIS,
12REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13REM See the License for the specific language governing permissions and
14REM limitations under the License.
15
16REM don't modify the caller's environment
17setlocal
18
19REM Locate dx.jar in the directory where dx.bat was found and start it.
20
21REM Set up prog to be the path of this script, including following symlinks,
22REM and set up progdir to be the fully-qualified pathname of its directory.
23set prog=%~f0
24
25REM Change current directory to where dx is, to avoid issues with directories
26REM containing whitespaces.
27cd /d %~dp0
28
29set jarfile=dx.jar
30set frameworkdir=
31
32if exist %frameworkdir%%jarfile% goto JarFileOk
33    set frameworkdir=lib\
34
35if exist %frameworkdir%%jarfile% goto JarFileOk
36    set frameworkdir=..\framework\
37
38:JarFileOk
39
40set jarpath=%frameworkdir%%jarfile%
41
42set javaOpts=
43
44REM If you want DX to have more memory when executing, uncomment the
45REM following line and adjust the value accordingly. Use "java -X" for
46REM a list of options you can pass here.
47REM 
48REM set javaOpts=-Xmx256M
49
50call java %javaOpts% -Djava.ext.dirs=%frameworkdir% -jar %jarpath% %*
51
52