diff --git a/java/xpcom/connect/src/ORB.h b/java/xpcom/connect/src/ORB.h index bc41805258e..1e6fcd10868 100644 --- a/java/xpcom/connect/src/ORB.h +++ b/java/xpcom/connect/src/ORB.h @@ -24,7 +24,7 @@ #define __ORB_h #include "bcIORB.h" -#define STUBS_COUNT (100) +#define STUBS_COUNT (1000) class ORB : public bcIORB { public: ORB(); diff --git a/java/xpcom/java/loader/bcJavaModule.cpp b/java/xpcom/java/loader/bcJavaModule.cpp index 6c58ec72c5a..3d89dd258c3 100644 --- a/java/xpcom/java/loader/bcJavaModule.cpp +++ b/java/xpcom/java/loader/bcJavaModule.cpp @@ -58,14 +58,14 @@ NS_IMETHODIMP bcJavaModule::RegisterSelf(nsIComponentManager *aCompMgr, nsIFile nsresult result = NS_OK; printf("--JavaModule::RegisterSelf\n"); ifstream in(location); - char cidStr[500], progid[1000], desc[1000]; + char cidStr[500], contractid[1000], desc[1000]; in.getline(cidStr,1000); - in.getline(progid,1000); + in.getline(contractid,1000); in.getline(desc,1000); - printf("%s %s %s", cidStr, progid, desc); + printf("%s %s %s", cidStr, contractid, desc); nsCID cid; cid.Parse((const char *)cidStr); - aCompMgr->RegisterComponentWithType(cid, desc, progid, _location, registryLocation, PR_TRUE, PR_TRUE, componentType); + aCompMgr->RegisterComponentWithType(cid, desc, contractid, _location, registryLocation, PR_TRUE, PR_TRUE, componentType); return result; } diff --git a/java/xpcom/java/src/Makefile.in b/java/xpcom/java/src/Makefile.in index 8f437360d18..35f012aabd5 100644 --- a/java/xpcom/java/src/Makefile.in +++ b/java/xpcom/java/src/Makefile.in @@ -55,7 +55,7 @@ DSO_LDOPTS += \ -L$(JDKHOME)/jre/lib/$(HOSTTYPE)/ \ -L$(JDKHOME)/jre/lib/$(HOSTTYPE)/classic \ -L$(JDKHOME)/jre/lib/$(HOSTTYPE)/native_threads \ - -ljvm -lhpi -ljava\ + -ljvm -lhpi -ljava -lawt\ $(NULL) #DSO_LDOPTS += \ diff --git a/java/xpcom/java/src/org_mozilla_xpcom_Utilities.cpp b/java/xpcom/java/src/org_mozilla_xpcom_Utilities.cpp index 479bdacd324..d1f25d8a6fa 100644 --- a/java/xpcom/java/src/org_mozilla_xpcom_Utilities.cpp +++ b/java/xpcom/java/src/org_mozilla_xpcom_Utilities.cpp @@ -107,9 +107,17 @@ JNIEXPORT jobjectArray JNICALL Java_org_mozilla_xpcom_Utilities_getInterfaceMeth for (int i = 0; i < num; i++) { interfaceInfo->GetMethodInfo(i, (const nsXPTMethodInfo **)&info); const char* name = info->GetName(); - // first letter of the method name is in lowercase in java - sprintf(buf, "%c%s", tolower(*name), name + 1); - env->SetObjectArrayElement(names, i, env->NewStringUTF(buf)); + + if (info->IsGetter()) { + sprintf(buf, "get%c%s", toupper(*name), name+1); + } else if (info->IsSetter()) { + sprintf(buf, "set%c%s", toupper(*name), name+1); + } else { + // first letter of the method name is in lowercase in java + sprintf(buf, "%c%s", tolower(*name), name + 1); + } + env->SetObjectArrayElement(names, i, env->NewStringUTF(buf)); } return names; } +