diff --git a/frameworks/native/runtime/sts_runtime.cpp b/frameworks/native/runtime/sts_runtime.cpp index c9eaf0bcc830b4883b9e20b8076b6919688ea39e..5a9d811bc4bfc2dcc4fe769e35abbca6938de356 100644 --- a/frameworks/native/runtime/sts_runtime.cpp +++ b/frameworks/native/runtime/sts_runtime.cpp @@ -664,6 +664,7 @@ std::unique_ptr STSRuntime::LoadStsModule(const std::string& return std::make_unique(); } std::string entryPath = EntryPathManager::GetInstance().GetEntryPath(srcEntrance); + std::replace(entryPath.begin(), entryPath.end(), '/', '.'); ani_string entryClassStr; aniEnv->String_NewUTF8(entryPath.c_str(), entryPath.length(), &entryClassStr); ani_class entryClass = nullptr; @@ -753,4 +754,4 @@ void STSRuntime::PreloadClass(const char *className) } } } // namespace AbilityRuntime -} // namespace OHOS \ No newline at end of file +} // namespace OHOS