mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +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,9 +552,21 @@ BOOL validationJavaVersion(){
|
|||||||
|
|
||||||
jint create_vm_rc = create_vm(&jvm, &env, &args);
|
jint create_vm_rc = create_vm(&jvm, &env, &args);
|
||||||
if (create_vm_rc != JNI_OK || jvm == NULL) {
|
if (create_vm_rc != JNI_OK || jvm == NULL) {
|
||||||
|
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);
|
NSLog(@"JNI_CreateJavaVM (%@) failed: %ld", vm.bundlePath, create_vm_rc);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jclass string_class = (*env)->FindClass(env, "java/lang/String");
|
jclass string_class = (*env)->FindClass(env, "java/lang/String");
|
||||||
if (string_class == NULL) {
|
if (string_class == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user