Add new first argument to PlugletFactory.initialize(): the string that
is the path to the jar from which the pluglet is loaded. SECTION: Changes M classes/org/mozilla/pluglet/PlugletFactory.java M classes/org/mozilla/pluglet/PlugletFactoryAdaptor.java - Add new first argument to PlugletFactory.initialize(): the string that is the path to the jar from which the pluglet is loaded. M examples/MediaPlayer/JMPlayer.java M test/test.java - Account for new first argument M src/PlugletFactory.cpp - new JNI signature for initialize. git-svn-id: svn://10.0.0.236/trunk@215304 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -202,7 +202,7 @@ void PlugletEngine::StartJVM() {
|
||||
options[3].optionString=""; //-Djava.compiler=NONE";
|
||||
vm_args.version = JNI_VERSION_1_4;
|
||||
vm_args.options = options;
|
||||
vm_args.nOptions = 1; // EDBURNS: Change for debugging
|
||||
vm_args.nOptions = 3; // EDBURNS: Change to 4 for debugging
|
||||
vm_args.ignoreUnrecognized = JNI_FALSE;
|
||||
/* Create the Java VM */
|
||||
res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
|
||||
|
||||
@@ -99,7 +99,8 @@ nsresult PlugletFactory::Initialize(void) {
|
||||
env->ExceptionDescribe();
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
initializeMID = env->GetMethodID(clazz,"initialize","(Lorg/mozilla/pluglet/mozilla/PlugletManager;)V");
|
||||
initializeMID = env->GetMethodID(clazz,"initialize",
|
||||
"(Ljava/lang/String;Lorg/mozilla/pluglet/mozilla/PlugletManager;)V");
|
||||
if (!initializeMID) {
|
||||
env->ExceptionDescribe();
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -116,7 +117,9 @@ nsresult PlugletFactory::Initialize(void) {
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
env->CallVoidMethod(jthis,initializeMID,plugletEngineObj);
|
||||
jstring jpath = env->NewStringUTF(path);
|
||||
env->CallVoidMethod(jthis,initializeMID, jpath, plugletEngineObj);
|
||||
env->ReleaseStringUTFChars(jpath, path);
|
||||
if (env->ExceptionOccurred()) {
|
||||
env->ExceptionDescribe();
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user