/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
static {
java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("osx"));
}
private static native void nativeInvokeNonPublic(Class<? extends Method> cls, Method m, String[] args);
// entry point from native
}
// these are the values for the enumeration JavaFailureMode
this.javaDictionary = javaDictionary;
}
public void run() {
try {
} catch (final IllegalAccessException x) {
try {
if ((excpt instanceof UnsatisfiedLinkError) && excpt.getMessage().equals("nativeInvokeNonPublic")) {
} else {
}
}
} catch (final InvocationTargetException invokeExcpt) {
showFailureAlertAndKill(kJavaFailureMainThrewException, invokeExcpt.getTargetException().toString());
}
}
try {
final Class<?> mainClass = Class.forName(mainClassName, true, sun.misc.Launcher.getLauncher().getClassLoader());
}
return mainMethod;
} catch (final ExceptionInInitializerError x) {
x.getException().printStackTrace();
} catch (final ClassNotFoundException x) {
} catch (final NoSuchMethodException x) {
} catch (final NullPointerException x) {
logError("No main class specified");
}
return null;
}
// get main class name from 'Jar' key, or 'MainClass' key
logError("'Jar' key in 'Java' sub-dictionary of Info.plist requires a string value");
return null;
}
log("'Jar' key of sub-dictionary 'Java' of Info.plist key is empty");
} else {
// extract main class from manifest of this jar
return null;
}
return main;
}
}
logError("'MainClass' key in 'Java' sub-dictionary of Info.plist requires a string value");
return null;
}
log("'MainClass' key of sub-dictionary 'Java' of Info.plist key is empty");
return null;
}
log("Main class " + (String)javaMain + " found via 'MainClass' key of sub-dictionary 'Java' of Info.plist key");
}
// get arguments for main(String[]) out of Info.plist and command line
// check for 'Arguments' key, which contains the main() args if not defined in Info.plist
if (javaArguments == null) {
// no arguments
log("No arguments for main(String[]) specified");
return new String[0];
}
if (javaArguments instanceof List) {
for (int i = 0; i < count; ++i) {
} else {
logError("Found non-string in array");
}
}
return result;
}
logError("'Arguments' key in 'Java' sub-dictionary of Info.plist requires a string value or an array of strings");
return new String[0];
}
// returns name of main class, or null
try {
} catch (final IOException x) {
// shrug
} finally {
try {
} catch (final IOException x) { }
}
}
return null;
}
if (!verbose) return;
}
}
// This kills the app and does not return!
}
}
}