Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement JVM_LoadZipLibrary() #18055

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Correct return type of JVM_LoadZipLibrary()
Signed-off-by: Keith W. Campbell <[email protected]>
wip

Signed-off-by: Keith W. Campbell <[email protected]>
Implement JVM_LoadZipLibrary()

Signed-off-by: Keith W. Campbell <[email protected]>
  • Loading branch information
keithc-ca committed Aug 30, 2023
commit 1578cc5b61fe7d19a0c0bb478f3be52c0a8d9b5a
22 changes: 20 additions & 2 deletions runtime/j9vm/javanextvmi.cpp
Original file line number Diff line number Diff line change
@@ -223,8 +223,26 @@ JVM_ReportFinalizationComplete(JNIEnv *env, jobject obj)
JNIEXPORT void * JNICALL
JVM_LoadZipLibrary(void)
{
Assert_SC_true(!"JVM_LoadZipLibrary unimplemented");
return NULL;
void *zipHandle = NULL;
J9JavaVM *vm = BFUjavaVM;

if (NULL != vm) {
PORT_ACCESS_FROM_JAVAVM(vm);
uintptr_t handle = 0;

if (J9PORT_SL_FOUND == j9sl_open_shared_library(
(char *)"zip",
&handle,
OMRPORT_SLOPEN_DECORATE | OMRPORT_SLOPEN_LAZY)
) {
zipHandle = (void *)handle;
}
}

/* We may as well assert here: we won't make much progress without the library. */
Assert_SC_notNull(zipHandle);

return zipHandle;
}

JNIEXPORT void JNICALL