src/os/linux/launcher/java.h

changeset 435
a61af66fc99e
child 823
f008d3631bd1
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/os/linux/launcher/java.h	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,104 @@
     1.4 +/*
     1.5 + * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.
    1.11 + *
    1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 + * version 2 for more details (a copy is included in the LICENSE file that
    1.16 + * accompanied this code).
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License version
    1.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 + *
    1.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
    1.24 + * have any questions.
    1.25 + *
    1.26 + */
    1.27 +
    1.28 +/*
    1.29 + * Gamma (Hotspot internal engineering test) launcher based on 1.6.0-b28 JDK,
    1.30 + * search "GAMMA" for gamma specific changes.
    1.31 + */
    1.32 +
    1.33 +#ifndef _JAVA_H_
    1.34 +#define _JAVA_H_
    1.35 +
    1.36 +/*
    1.37 + * Get system specific defines.
    1.38 + */
    1.39 +#include "jni.h"
    1.40 +#include "java_md.h"
    1.41 +
    1.42 +/*
    1.43 + * Pointers to the needed JNI invocation API, initialized by LoadJavaVM.
    1.44 + */
    1.45 +typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
    1.46 +typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
    1.47 +
    1.48 +typedef struct {
    1.49 +    CreateJavaVM_t CreateJavaVM;
    1.50 +    GetDefaultJavaVMInitArgs_t GetDefaultJavaVMInitArgs;
    1.51 +} InvocationFunctions;
    1.52 +
    1.53 +/*
    1.54 + * Prototypes for launcher functions in the system specific java_md.c.
    1.55 + */
    1.56 +
    1.57 +jboolean
    1.58 +LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn);
    1.59 +
    1.60 +void
    1.61 +GetXUsagePath(char *buf, jint bufsize);
    1.62 +
    1.63 +jboolean
    1.64 +GetApplicationHome(char *buf, jint bufsize);
    1.65 +
    1.66 +const char *
    1.67 +GetArch();
    1.68 +
    1.69 +void CreateExecutionEnvironment(int *_argc,
    1.70 +                                       char ***_argv,
    1.71 +                                       char jrepath[],
    1.72 +                                       jint so_jrepath,
    1.73 +                                       char jvmpath[],
    1.74 +                                       jint so_jvmpath,
    1.75 +                                       char **original_argv);
    1.76 +
    1.77 +/*
    1.78 + * Report an error message to stderr or a window as appropriate.  The
    1.79 + * flag always is set to JNI_TRUE if message is to be reported to both
    1.80 + * strerr and windows and set to JNI_FALSE if the message should only
    1.81 + * be sent to a window.
    1.82 + */
    1.83 +void ReportErrorMessage(char * message, jboolean always);
    1.84 +void ReportErrorMessage2(char * format, char * string, jboolean always);
    1.85 +
    1.86 +/*
    1.87 + * Report an exception which terminates the vm to stderr or a window
    1.88 + * as appropriate.
    1.89 + */
    1.90 +void ReportExceptionDescription(JNIEnv * env);
    1.91 +
    1.92 +jboolean RemovableMachineDependentOption(char * option);
    1.93 +void PrintMachineDependentOptions();
    1.94 +
    1.95 +/*
    1.96 + * Functions defined in java.c and used in java_md.c.
    1.97 + */
    1.98 +jint ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative);
    1.99 +char *CheckJvmType(int *argc, char ***argv, jboolean speculative);
   1.100 +void* MemAlloc(size_t size);
   1.101 +
   1.102 +/*
   1.103 + * Make launcher spit debug output.
   1.104 + */
   1.105 +extern jboolean _launcher_debug;
   1.106 +
   1.107 +#endif /* _JAVA_H_ */

mercurial