| 1 | @echo off
|
|---|
| 2 |
|
|---|
| 3 | REM
|
|---|
| 4 | REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
|---|
| 5 | REM
|
|---|
| 6 | REM Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved.
|
|---|
| 7 | REM
|
|---|
| 8 | REM The contents of this file are subject to the terms of either the GNU
|
|---|
| 9 | REM General Public License Version 2 only ("GPL") or the Common Development
|
|---|
| 10 | REM and Distribution License("CDDL") (collectively, the "License"). You
|
|---|
| 11 | REM may not use this file except in compliance with the License. You can
|
|---|
| 12 | REM obtain a copy of the License at
|
|---|
| 13 | REM https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
|---|
| 14 | REM or LICENSE.txt. See the License for the specific
|
|---|
| 15 | REM language governing permissions and limitations under the License.
|
|---|
| 16 | REM
|
|---|
| 17 | REM When distributing the software, include this License Header Notice in each
|
|---|
| 18 | REM file and include the License file at LICENSE.txt.
|
|---|
| 19 | REM
|
|---|
| 20 | REM GPL Classpath Exception:
|
|---|
| 21 | REM Oracle designates this particular file as subject to the "Classpath"
|
|---|
| 22 | REM exception as provided by Oracle in the GPL Version 2 section of the License
|
|---|
| 23 | REM file that accompanied this code.
|
|---|
| 24 | REM
|
|---|
| 25 | REM Modifications:
|
|---|
| 26 | REM If applicable, add the following below the License Header, with the fields
|
|---|
| 27 | REM enclosed by brackets [] replaced by your own identifying information:
|
|---|
| 28 | REM "Portions Copyright [year] [name of copyright owner]"
|
|---|
| 29 | REM
|
|---|
| 30 | REM Contributor(s):
|
|---|
| 31 | REM If you wish your version of this file to be governed by only the CDDL or
|
|---|
| 32 | REM only the GPL Version 2, indicate your decision by adding "[Contributor]
|
|---|
| 33 | REM elects to include this software in this distribution under the [CDDL or GPL
|
|---|
| 34 | REM Version 2] license." If you don't indicate a single choice of license, a
|
|---|
| 35 | REM recipient has the option to distribute your version of this file under
|
|---|
| 36 | REM either the CDDL, the GPL Version 2 or to extend the choice of license to
|
|---|
| 37 | REM its licensees as provided above. However, if you add GPL Version 2 code
|
|---|
| 38 | REM and therefore, elected the GPL Version 2 license, then the option applies
|
|---|
| 39 | REM only if the new code is made subject to such option by the copyright
|
|---|
| 40 | REM holder.
|
|---|
| 41 | REM
|
|---|
| 42 |
|
|---|
| 43 | rem
|
|---|
| 44 | rem Make sure that JAXB_HOME and JAVA_HOME are set
|
|---|
| 45 | rem
|
|---|
| 46 | if not "%JAXB_HOME%" == "" goto CHECKJAVAHOME
|
|---|
| 47 |
|
|---|
| 48 | rem Try to locate JAXB_HOME
|
|---|
| 49 | set JAXB_HOME=%~dp0
|
|---|
| 50 | set JAXB_HOME=%JAXB_HOME%\..
|
|---|
| 51 | if exist "%JAXB_HOME%\lib\jaxb-xjc.jar" goto CHECKJAVAHOME
|
|---|
| 52 |
|
|---|
| 53 | rem Unable to find it
|
|---|
| 54 | echo JAXB_HOME must be set before running this script
|
|---|
| 55 | goto END
|
|---|
| 56 |
|
|---|
| 57 | :CHECKJAVAHOME
|
|---|
| 58 | if not "%JAVA_HOME%" == "" goto USE_JAVA_HOME
|
|---|
| 59 |
|
|---|
| 60 | set JAVA=java
|
|---|
| 61 | goto LAUNCHXJC
|
|---|
| 62 |
|
|---|
| 63 | :USE_JAVA_HOME
|
|---|
| 64 | set JAVA="%JAVA_HOME%\bin\java"
|
|---|
| 65 | goto LAUNCHXJC
|
|---|
| 66 |
|
|---|
| 67 | :LAUNCHXJC
|
|---|
| 68 | %JAVA% %XJC_OPTS% -cp "%JAXB_HOME%\lib\*" com.sun.tools.xjc.XJCFacade %*
|
|---|
| 69 |
|
|---|
| 70 | :END
|
|---|
| 71 | %COMSPEC% /C exit %ERRORLEVEL%
|
|---|