PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|Code_Examples|Java|launcher|java_md.c =

page 2 of 18



 * (removes -client, -server, etc.)            |
 *                                            \|/
 *                                            CreateExecutionEnvironment
 *                                            (removes -d32 and -d64, 
 *                                             determines desired data model,
 *                                             sets up LD_LIBRARY_PATH, 
 *                                             and exec's)
 *                                             |
 *  --------------------------------------------
 *  |
 * \|/
 * exec child 1 incoming argv -----------------
 *  |                                          |
 * \|/                                         |
 * CheckJVMType                                |
 * (removes -client, -server, etc.)            |
 *  |                                         \|/
 *  |                                          CreateExecutionEnvironment
 *  |                                          (verifies desired data model 
 *  |                                           is running and acceptable 
 *  |                                           LD_LIBRARY_PATH;
 *  |                                           no-op in child)
 *  |
 * \|/
 * TranslateDashJArgs...
 * (Prepare to pass args to vm)
 *  |
 *  |
 *  |
 * \|/
 * ParseArguments
 * (ignores -d32 and -d64,
 *  processes version options,
 *  creates argument list for vm, 
 *  etc.)
 * 
 */

static char *SetExecname(char **argv);
static char * GetExecname();
static jboolean GetJVMPath(const char *jrepath, const char *jvmtype,
			   char *jvmpath, jint jvmpathsize, char * arch);
static jboolean GetJREPath(char *path, jint pathsize, char * arch, jboolean speculative);

const char *
GetArch()
{
    return LIBARCHNAME;
}

void
CreateExecutionEnvironment(int *_argcp,
			   char ***_argvp,
			   char jrepath[],
			   jint so_jrepath,
			   char jvmpath[],
			   jint so_jvmpath,
			   char **original_argv) {
  /*
   * First, determine if we are running the desired data model.  If we
   * are running the desired data model, all the error messages
   * associated with calling GetJREPath, ReadKnownVMs, etc. should be
   * output.  However, if we are not running the desired data model,
   * some of the errors should be suppressed since it is more
   * informative to issue an error message based on whether or not the
   * os/processor combination has dual mode capabilities.
   */

    char *execname = NULL;
    int original_argc = *_argcp;
    jboolean jvmpathExists;

    /* Compute the name of the executable */
    execname = SetExecname(*_argvp);

    /* Set the LD_LIBRARY_PATH environment variable, check data model
       flags, and exec process, if needed */
    {
      char *arch	= (char *)GetArch(); /* like sparc or sparcv9 */
      char * jvmtype 	= NULL;
      int argc		= *_argcp;
      char **argv	= original_argv;

      char *runpath	= NULL; /* existing effective LD_LIBRARY_PATH
				   setting */

      int running	=	/* What data model is being ILP32 =>
				   32 bit vm; LP64 => 64 bit vm */
#ifdef _LP64 
	64;
#else
      32;
#endif

      int wanted	= running;	/* What data mode is being
					   asked for? Current model is
					   fine unless another model
					   is asked for */

      char* new_runpath	= NULL; /* desired new LD_LIBRARY_PATH string */
=2=

1| < PREV = PAGE 2 = NEXT > |3|4|5|6|7|8|9|10|11.18

UP TO ROOT | UP TO DIR | TO FIRST PAGE

Google
 


E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.014101 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU)