< prev index next >

src/java.base/share/native/libjli/java.h

Print this page




 213 /*
 214  * This allows for finding classes from the VM's bootstrap class loader directly,
 215  * FindClass uses the application class loader internally, this will cause
 216  * unnecessary searching of the classpath for the required classes.
 217  *
 218  */
 219 typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
 220                                                   const char *name));
 221 jclass FindBootStrapClass(JNIEnv *env, const char *classname);
 222 
 223 jobjectArray CreateApplicationArgs(JNIEnv *env, char **strv, int argc);
 224 jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc);
 225 jclass GetLauncherHelperClass(JNIEnv *env);
 226 
 227 int JNICALL JavaMain(void * args); /* entry point                  */
 228 
 229 enum LaunchMode {               // cf. sun.launcher.LauncherHelper
 230     LM_UNKNOWN = 0,
 231     LM_CLASS,
 232     LM_JAR,
 233     LM_MODULE

 234 };
 235 
 236 static const char *launchModeNames[]
 237     = { "Unknown", "Main class", "JAR file", "Module" };
 238 
 239 typedef struct {
 240     int    argc;
 241     char **argv;
 242     int    mode;
 243     char  *what;
 244     InvocationFunctions ifn;
 245 } JavaMainArgs;
 246 
 247 #define NULL_CHECK_RETURN_VALUE(NCRV_check_pointer, NCRV_return_value) \
 248     do { \
 249         if ((NCRV_check_pointer) == NULL) { \
 250             JLI_ReportErrorMessage(JNI_ERROR); \
 251             return NCRV_return_value; \
 252         } \
 253     } while (JNI_FALSE)
 254 
 255 #define NULL_CHECK0(NC0_check_pointer) \
 256     NULL_CHECK_RETURN_VALUE(NC0_check_pointer, 0)
 257 


 213 /*
 214  * This allows for finding classes from the VM's bootstrap class loader directly,
 215  * FindClass uses the application class loader internally, this will cause
 216  * unnecessary searching of the classpath for the required classes.
 217  *
 218  */
 219 typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
 220                                                   const char *name));
 221 jclass FindBootStrapClass(JNIEnv *env, const char *classname);
 222 
 223 jobjectArray CreateApplicationArgs(JNIEnv *env, char **strv, int argc);
 224 jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc);
 225 jclass GetLauncherHelperClass(JNIEnv *env);
 226 
 227 int JNICALL JavaMain(void * args); /* entry point                  */
 228 
 229 enum LaunchMode {               // cf. sun.launcher.LauncherHelper
 230     LM_UNKNOWN = 0,
 231     LM_CLASS,
 232     LM_JAR,
 233     LM_MODULE,
 234     LM_SOURCE
 235 };
 236 
 237 static const char *launchModeNames[]
 238     = { "Unknown", "Main class", "JAR file", "Module", "Source" };
 239 
 240 typedef struct {
 241     int    argc;
 242     char **argv;
 243     int    mode;
 244     char  *what;
 245     InvocationFunctions ifn;
 246 } JavaMainArgs;
 247 
 248 #define NULL_CHECK_RETURN_VALUE(NCRV_check_pointer, NCRV_return_value) \
 249     do { \
 250         if ((NCRV_check_pointer) == NULL) { \
 251             JLI_ReportErrorMessage(JNI_ERROR); \
 252             return NCRV_return_value; \
 253         } \
 254     } while (JNI_FALSE)
 255 
 256 #define NULL_CHECK0(NC0_check_pointer) \
 257     NULL_CHECK_RETURN_VALUE(NC0_check_pointer, 0)
 258 
< prev index next >