6 #ifndef xmog_jvm_options_inc
7 #define xmog_jvm_options_inc
13 typedef void (JNICALL *XMOG_ABORT)();
14 typedef void (JNICALL *XMOG_EXIT)(jint);
15 typedef jint (JNICALL *XMOG_VFPRINTF)(FILE*,
const char*,va_list);
37 #if (XMOG_SUPPORTS_JNI_11==1)
52 #endif //XMOG_SUPPORTS_JNI_11
193 xmog_jvm_options(
const char * filename, XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0,
bool bEnvOverrides =
true );
197 xmog_jvm_options( XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0,
bool bEnvOverrides =
true );
221 virtual void * getInitArgs( jint jniVersion );
245 virtual int readJvmOptions(
const char * file, XMOGVERSION vers = NULL, XMOGCONFIG conf = NULL, XMOGVERSION reserved0 = NULL );
253 virtual void reset();
260 virtual void setJniVersion( jint version );
267 virtual void setJniVersion(
const char * version );
274 virtual jint getJniVersion();
283 virtual void setIgnoreUnrecognized(
bool ignore );
293 virtual void setIgnoreUnrecognized(
const char * ignore );
299 virtual bool getIgnoreUnrecognized();
309 virtual void setStackSizeInKB( jint ss );
319 virtual void setStackSize(
const char * ss );
324 virtual jint getStackSizeInKB();
334 virtual void setInitialHeapSizeInMB( jint ihs );
349 virtual void setInitialHeapSize(
const char * ihs );
354 virtual jint getInitialHeapSizeInMB();
364 virtual void setMaximumHeapSizeInMB( jint mhs );
381 virtual void setMaximumHeapSize(
const char * mhs );
386 virtual jint getMaximumHeapSizeInMB();
396 virtual void setDashDOption(
const char * name,
const char * value = 0 );
404 virtual char * getDashDOption(
const char * name );
411 virtual void removeDashDOption(
const char * name );
425 virtual void setDashXOption(
const char * name,
const char * value = 0 );
433 virtual char * getDashXOption(
const char * name );
440 virtual void removeDashXOption(
const char * name );
448 virtual void setOtherOption(
const char * namevalue,
void * ptr = 0 );
455 virtual void * getOtherOption(
const char * name );
465 virtual void removeOtherOption(
const char * name );
481 virtual void setClassPath(
const char * cp );
491 virtual void appendToClassPath(
const char * cp );
505 virtual void prependToClassPath(
const char * cp );
510 virtual char * getClassPath();
523 virtual void setLibraryPath(
const char * lp );
530 virtual void appendToLibraryPath(
const char * lp );
535 virtual char * getLibraryPath();
549 virtual void setExtensionsDirectories(
const char * ed );
556 virtual void appendToExtensionsDirectories(
const char * ed );
561 virtual char * getExtensionsDirectories();
573 virtual void setSecurityManager(
const char * sm );
578 virtual char * getSecurityManager();
589 virtual void setSecurityPolicy(
const char * policyFile );
594 virtual char * getSecurityPolicy();
602 virtual void setVfprintf( XMOG_VFPRINTF vfp );
610 virtual void setVfprintf(
const char * vfp );
616 virtual XMOG_VFPRINTF getVfprintf();
624 virtual void setExit( XMOG_EXIT ex );
632 virtual void setExit(
const char * ex );
637 virtual XMOG_EXIT getExit();
645 virtual void setAbort( XMOG_ABORT ab );
653 virtual void setAbort(
const char * ab );
658 virtual XMOG_ABORT getAbort();
665 virtual void setDisableClassGC(
bool dcgc );
672 virtual void setDisableClassGC(
const char * dcgc );
679 virtual bool getDisableClassGC();
686 virtual void setEnableClassGC(
bool ecgc );
693 virtual void setEnableClassGC(
const char * ecgc );
700 virtual bool getEnableClassGC();
702 virtual void setEnableVerboseGC(
bool evgc );
704 virtual void setEnableVerboseGC(
const char * evgc );
706 virtual bool getEnableVerboseGC();
708 virtual void setEnabledAssertions(
const char * ea );
710 virtual void appendToEnabledAssertions(
const char * ea );
712 virtual char * getEnabledAssertions();
714 virtual void setDisabledAssertions(
const char * da );
716 virtual void appendToDisabledAssertions(
const char * da );
718 virtual char * getDisabledAssertions();
720 virtual void setEnableSystemAssertions(
bool esa );
722 virtual void setEnableSystemAssertions(
const char * esa );
724 virtual bool getEnableSystemAssertions();
726 virtual void setDisableSystemAssertions(
bool dsa );
728 virtual void setDisableSystemAssertions(
const char * dsa );
730 virtual bool getDisableSystemAssertions();
732 virtual void setVerbosity(
int v );
734 virtual void setVerbosity(
const char * v );
750 virtual void setMixedMode(
bool m );
757 virtual void setMixedMode(
const char * m );
764 virtual bool getMixedMode();
771 virtual void setInterpretedMode(
bool i );
778 virtual void setInterpretedMode(
const char * i );
785 virtual bool getInterpretedMode();
792 virtual void setAppendBootClassPath(
const char * cp );
799 virtual void appendToAppendBootClassPath(
const char * cp );
806 virtual char * getAppendBootClassPath();
813 virtual void setPrependBootClassPath(
const char * cp );
820 virtual void appendToPrependBootClassPath(
const char * cp );
827 virtual char * getPrependBootClassPath();
838 virtual void setBootClassPath(
const char * cp );
849 virtual void appendToBootClassPath(
const char * cp );
860 virtual char * getBootClassPath();
869 virtual void setIncrementalGC(
bool i );
878 virtual void setIncrementalGC(
const char * i );
887 virtual bool getIncrementalGC();
898 virtual void setLogGCFile(
const char * file );
908 virtual char * getLogGCFile();
915 virtual void setBatchMode(
bool b );
922 virtual void setBatchMode(
const char * b );
927 virtual bool getBatchMode();
934 virtual void setProf(
bool p );
941 virtual void setProf(
const char * p );
946 virtual bool getProf();
953 virtual void setRun(
const char * runopts );
958 virtual char * getRun();
965 virtual void setDebug(
bool d );
972 virtual void setDebug(
const char * d );
977 virtual bool getDebug();
984 virtual void setNoagent(
bool na );
991 virtual void setNoagent(
const char * na );
996 virtual bool getNoagent();
1006 virtual void setReduceSignals(
bool rs );
1016 virtual void setReduceSignals(
const char * rs );
1021 virtual bool getReduceSignals();
1032 virtual void setCheckJni(
bool cjni );
1043 virtual void setCheckJni(
const char * cjni );
1048 virtual bool getCheckJni();
1055 virtual void setFuture(
bool future );
1062 virtual void setFuture(
const char * future );
1067 virtual bool getFuture();
1074 virtual void addAgentLib(
const char * pAgentLib );
1081 virtual void addAgentPath(
const char * pAgentPath );
1088 virtual void addJavaAgent(
const char * pJavaAgent );
1090 #if (XMOG_SUPPORTS_JNI_11==1)
1095 virtual void mergeWithDefaults( JDK1_1InitArgs & iargs11 );
1100 virtual void setCheckSource(
bool cs );
1105 virtual bool getCheckSource();
1110 virtual void setNativeStackSizeInKB( jint nss );
1115 virtual jint getNativeStackSizeInKB();
1130 virtual void setDisableAsyncGC(
bool dagc );
1135 virtual bool getDisableAsyncGC();
1137 #endif //XMOG_SUPPORTS_JNI_11
1151 virtual void addModules(
const char * pMdules );
1168 virtual void setModulePath(
const char * mp );
1177 virtual void appendToModulePath(
const char * mp );
1190 virtual void prependToModulePath(
const char * mp );
1197 virtual char * getModulePath();
1213 virtual void addOpens(
const char * pMod,
const char * pPackage,
const char * pReadingModule =
"ALL-UNNAMED" );
1229 virtual void addExports(
const char * pMod,
const char * pPackage,
const char * pReadingModule =
"ALL-UNNAMED" );
1245 virtual void addReads(
const char * pModule,
const char * pModules );
1251 void env_override();
1257 JavaVMInitArgs iargs_12;
1265 int readJvmOptionsFromRegistry( XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0 );
1267 int readJvmOptionsInJunction20Format(
const char * file, XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0 );
1269 int readJvmOptionsInXmlFormat(
const char * file );
1271 JavaVMOption * find12Option(
const char * prefix,
const char * name,
size_t combined_length = 0 );
1273 void add12Option(
const char * prefix,
const char * name,
char sep,
const char * value = 0,
void * extra = 0 );
1275 void remove12Option(
const char * prefix,
const char * name );
1277 void append12Option(
const char * prefix,
const char * name,
char sep,
const char * value );
1279 void setVerbosity_(
const char * verbosity );
1281 # if (XMOG_SUPPORTS_JNI_11==1)
1287 JDK1_1InitArgs iargs_11;
1289 unsigned iargs_11_modified;
1291 void appendString(
char ** ptr,
char sep,
const char * str );
1293 char ** find11Option(
const char * name,
size_t length = 0 );
1295 void add11Option(
const char * name,
const char * value = 0 );
1297 void remove11Option(
const char * name );
1299 # endif //XMOG_SUPPORTS_JNI_11