buyingyi | c73348c | 2012-11-02 00:31:31 +0000 | [diff] [blame] | 1 | @ECHO OFF |
| 2 | SETLOCAL |
| 3 | |
| 4 | :: Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 | :: contributor license agreements. See the NOTICE file distributed with |
| 6 | :: this work for additional information regarding copyright ownership. |
| 7 | :: The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 | :: (the "License"); you may not use this file except in compliance with |
| 9 | :: the License. You may obtain a copy of the License at |
| 10 | :: |
| 11 | :: http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | :: |
| 13 | :: Unless required by applicable law or agreed to in writing, software |
| 14 | :: distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | :: See the License for the specific language governing permissions and |
| 17 | :: limitations under the License. |
| 18 | |
| 19 | :: JAVA classpath |
| 20 | :: Use the local variable CLASSPATH to add custom entries (e.g. JDBC drivers) to |
| 21 | :: the classpath. Separate multiple paths with ":". Enclose the value |
| 22 | :: in double quotes. Adding additional files or locations on separate |
| 23 | :: lines makes things clearer. |
| 24 | :: Note: If under running under cygwin use "/cygdrive/c/..." for "C:/..." |
| 25 | :: Example: |
| 26 | :: |
| 27 | :: Set the CLASSPATH to a jar file and a directory. Note that |
| 28 | :: "classes dir" is a directory of class files with a space in the name. |
| 29 | :: |
| 30 | :: CLASSPATH="usr/local/Product1/lib/product.jar" |
| 31 | :: CLASSPATH="${CLASSPATH}:../MyProject/classes dir" |
| 32 | :: |
| 33 | SET CLASSPATH="@classpath@" |
| 34 | |
| 35 | :: JVM parameters |
| 36 | :: If you want to modify the default parameters (e.g. maximum heap size -Xmx) |
| 37 | :: for the Java virtual machine set the local variable JVM_PARAMETERS below |
| 38 | :: Example: |
| 39 | :: JVM_PARAMETERS=-Xms100M -Xmx200M |
| 40 | :: |
| 41 | :: Below are the JVM parameters needed to do remote debugging using Intellij |
| 42 | :: IDEA. Uncomment and then do: JVM_PARAMETERS="$IDEA_REMOTE_DEBUG_PARAMS" |
| 43 | :: IDEA_REMOTE_DEBUG_PARAMS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" |
| 44 | :: |
| 45 | :: JVM_PARAMETERS= |
| 46 | |
| 47 | :: --------------------------------------------------------------------------- |
| 48 | :: Default configuration. Do not modify below this line. |
| 49 | :: --------------------------------------------------------------------------- |
| 50 | :: Application specific parameters |
| 51 | |
| 52 | SET MAIN_CLASS=@main.class@ |
| 53 | SET JVM_PARAMS=@jvm.params@ |
| 54 | SET PROGRAM_PARAMS=@program.params@ |
| 55 | |
| 56 | :: Try to find java virtual machine |
| 57 | IF NOT DEFINED JAVA ( |
| 58 | IF NOT DEFINED JAVA_HOME SET JAVA="java.exe" |
| 59 | IF DEFINED JAVA_HOME SET JAVA="%JAVA_HOME%\bin\java.exe" |
| 60 | ) |
| 61 | |
| 62 | :: Run program |
| 63 | %JAVA% %JVM_PARAMS% %JVM_PARAMETERS% -classpath %CLASSPATH% %MAIN_CLASS% %PROGRAM_PARAMS% %* |