appclient.js revision ada1678a4262b208a7b87391f520a7767d25287c
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
var pathSep = ";";
"\\lib\\endorsed" +
pathSep +
"\\endorsed", pathSep);
var mainClassIdentRequired = 1;
" -Djava.system.class.loader=org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader" +
" -Djava.security.auth.login.config=" + quoteStringIfNeeded(AS_INSTALL + "\\lib\\appclient\\appclientlogin.conf");
if (VMARGS != "") {
}
var accArgs;
var appArgs;
var jvmMainArgs;
var accMainArgs;
var mainClassIdent;
var expecting;
var ACCArgType;
var JVMArgType;
var matched = false;
inputArgs="-usage";
}
processArgs();
if (appcPath != "") {
}
if (jvmMainArgs == "") {
if (mainClassIdentRequired == 1) {
inputArgs="-usage";
processArgs();
//recordACCArg("usage");
//accMainArgs = "-usage";
//jvmMainArgs = "-jar " + accJar;
}
}
/*
* The next statement emits a "set" command which assigns the java command to be
* run to the env. variable "javaCmd." The calling script then
* simply includes a line %javaCmd% to execute the generated
* command. Defining the env. variable from this
* script does not work; the scope is not right.
*/
// return to shell here
function prepareArgProcessing() {
accArgs = "=mode=acscript";
appArgs = "";
jvmMainArgs = "";
userEndorsedDirSetting = null;
accMainArgs = "";
mainClassIdent = null;
expecting=null;
ACCArgType="ACC";
JVMArgType="JVM";
recordACCArg("-configxml", quoteStringIfNeeded(AS_INSTALL + "\\domains\\domain1\\config\\sun-acc.xml"));
//matched = false;
}
function processArgs() {
"-configxml", "-user", "-password", "-passwordfile",
"-targetserver"];
//var re = new RegExp("\"([^\"]+)\"|[^\"\\s]+)","g");
// var tokens = inputArgs.split(" ");
// var tokens = re.exec(inputArgs);
var matched=null;
if (matched == null) {
}
if (matched == null) {
if (matched != null) {
}
}
}
if (matched == null) {
var tokenString = new String(token);
expecting = null;
}
}
if (matched == null) {
if (expecting != null) {
} else {
}
expecting = null;
}
}
}
if (result != null) {
}
return result;
}
expecting = null;
return token;
}
}
return null;
}
if (argType == "APP") {
} else if (argType == "ACC") {
} else if (argType == "JVM") {
}
}
if (arg2 != null) {
}
}
function jvmMainArgsFor(value) {
return "-jar " + accJar;
} else {
return "-jar " + value;
}
}
function recordClientArg(value) {
if (mainClassIdent == "final") {
recordAPPArg("-client");
} else {
// See if the client value is a folder.
} else {
}
mainClassIdent = "tentative";
}
}
if (ACCArgType == "APP") {
} else {
if (arg1 == "-client") {
} else {
if (arg2 != null) {
}
}
}
}
if (arg1 == "-jar") {
mainClassIdent = "final";
} else if (arg1 == "-client") {
mainClassIdent = "tentative";
} else {
mainClassIdent = "final";
} else {
jvmMainArgs = arg1;
mainClassIdent = "final";
}
}
ACCArgType = "APP";
JVMArgType = "APP";
}
if (JVMArgType == "APP") {
} else {
if (arg1 == "-jar") {
} else {
/*
* We need to merge the user's setting with the path to the
* app server's endorsed dir. So for now
* just remember the user's setting
* and do not add it to the jvm args...yet.
*/
}
if (arg2 != null) {
}
}
}
}
function finishJVMArgs() {
/*
* Note that the user's setting, if present, was stored including the
* -Djava.endorsed.dirs= part. So we just add on if the user specified
* anything but we must supply that part if the user did not specify anything.
*/
var endorsedDirSetting;
if (userEndorsedDirSetting != null) {
} else {
endorsedDirSetting = "-Djava.endorsed.dirs=" +
}
}
function recordNonACCOption(value) {
if (mainClassIdent == null) {
} else {
}
}
function quoteStringIfNeeded(s) {
var result = s;
}
return result;
}
function quoteMultiStringIfNeeded(s, sep) {
var result = new String();
var sepLoc;
var scanStart = 0;
}
}
return result;
}
function recordLoneArg(token) {
if (mainClassIdent == null) {
} else {
}
}
function jreEndorsedDirValue() {
var jreEndorsedDir = null;
if (jreHomePath != null) {
}
}
}
var jreHome = null;
for (i in osPathElts) {
var osPathElt = osPathElts[i];
// This looks like a JDK installation.
break;
} else {
// Doesn't look like a JDK; maybe it's a JRE installation.
// This looks like a JRE.
break;
} else {
// This path element looks like neither a JDK nor a JRE.
continue;
}
}
}
}
return jreHome;
}