SheafSystem  0.0.0.0
jvm_launcher Class Reference

Launcher for the Java virtual machine. More...

#include <jvm_launcher.h>

Public Types

enum  status_msg {
  SUCCESS = 0, JVM_CREATE_FAILURE = 1, CLASS_NOT_FOUND = 2, MAIN_NOT_FOUND = 3,
  OUT_OF_MEMORY = 4
}
 Return values. More...
 

Public Member Functions

int launch (const char *main_class_name, int argc, char *argv[], bool verbose=false)
 Launch the Java virtual machine, using the current CLASSPATH and LD_LIBRARY_PATH environment variables. More...
 
int launch (const char *main_class_name, int argc, char *argv[], const char *class_path, const char *ld_library_path, bool verbose=false)
 Launch the Java virtual machine, using specified values for the CLASSPATH and LD_LIBRARY_PATH environment variables. More...
 
virtual ~jvm_launcher ()
 Destructor. More...
 

Protected Member Functions

void re_exec (int argc, char *argv[], const char *class_path, const char *ld_library_path)
 Re-exec the current process with the using specified CLASSPATH and LD_LIBRARY_PATH environment variables. This allows LD_LIBRARY_PATH to be set so that the linker will recognize it at the proper time. More...
 

Detailed Description

Launcher for the Java virtual machine.

Definition at line 30 of file jvm_launcher.h.

Member Enumeration Documentation

◆ status_msg

Return values.

Definition at line 38 of file jvm_launcher.h.

Constructor & Destructor Documentation

◆ ~jvm_launcher()

virtual jvm_launcher::~jvm_launcher ( )
virtual

Destructor.

Member Function Documentation

◆ launch() [1/2]

int jvm_launcher::launch ( const char *  main_class_name,
int  argc,
char *  argv[],
bool  verbose = false 
)

Launch the Java virtual machine, using the current CLASSPATH and LD_LIBRARY_PATH environment variables.

Definition at line 31 of file jvm_launcher.cc.

◆ launch() [2/2]

int jvm_launcher::launch ( const char *  main_class_name,
int  argc,
char *  argv[],
const char *  class_path,
const char *  ld_library_path,
bool  verbose = false 
)

Launch the Java virtual machine, using specified values for the CLASSPATH and LD_LIBRARY_PATH environment variables.

Definition at line 45 of file jvm_launcher.cc.

References re_exec().

◆ re_exec()

void jvm_launcher::re_exec ( int  argc,
char *  argv[],
const char *  class_path,
const char *  ld_library_path 
)
protected

Re-exec the current process with the using specified CLASSPATH and LD_LIBRARY_PATH environment variables. This allows LD_LIBRARY_PATH to be set so that the linker will recognize it at the proper time.

Definition at line 180 of file jvm_launcher.cc.

Referenced by launch().


The documentation for this class was generated from the following files: