mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
IDEA-233043 Update IDEA launcher to use JBR without symlink to libjli.dylib
GitOrigin-RevId: 2cc7153be32a613f9b55a2d0843e40bc2830d886
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bed7f40bd1
commit
b3c7efab4a
@@ -552,8 +552,20 @@ BOOL validationJavaVersion(){
|
||||
|
||||
jint create_vm_rc = create_vm(&jvm, &env, &args);
|
||||
if (create_vm_rc != JNI_OK || jvm == NULL) {
|
||||
NSLog(@"JNI_CreateJavaVM (%@) failed: %ld", vm.bundlePath, create_vm_rc);
|
||||
exit(-1);
|
||||
NSString *serverLibUrl = [vm.bundlePath stringByAppendingPathComponent:@"Contents/Home/lib/server/libjvm.dylib"];
|
||||
|
||||
void *libHandle = dlopen(serverLibUrl.UTF8String, RTLD_NOW + RTLD_GLOBAL);
|
||||
if (libHandle) {
|
||||
create_vm = dlsym(libHandle, "JNI_CreateJavaVM");
|
||||
}
|
||||
|
||||
if (create_vm != NULL) {
|
||||
create_vm_rc = create_vm(&jvm, &env, &args);
|
||||
}
|
||||
if (create_vm == NULL || create_vm_rc != JNI_OK) {
|
||||
NSLog(@"JNI_CreateJavaVM (%@) failed: %ld", vm.bundlePath, create_vm_rc);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
jclass string_class = (*env)->FindClass(env, "java/lang/String");
|
||||
|
||||
Reference in New Issue
Block a user