Closed EPluribusUnum closed 7 years ago
I don't have access to a Windows machine with Delphi installed to try at the moment, but I remember that I had tried with Java 8 almost two years ago and it was working fine.
You need to check two things :
It was a path issue. Thank you!
Hi!
I cannot use jvm.dll, application crashes upon LoadVM (JNI_CreateJavaVM) call. No error message, no call stack, no log, just crash. If I use JNI_VERSION_1_7, no crash, but LoadVM returns JNI_EVERSION. Setting Xms, Xmx, Xss JVM parameters does not help. jvm.dll version : 25.40.0.25 (Java 1.8) (Java HotSpot(TM) Client VM) (x32) Tried with Delphi 7 @ Win XP and Delphi XE4 @ Win7
What could be the problem?
` VAR
errorcode : Integer;
JVM : TJavaVM;
Options: array [0..4] of JavaVMOption;
VM_args: JavaVMInitArgs;
JNIEnv : TJNIEnv;
Cls : JClass;
Mid: JMethodID;
begin
JVM := TJavaVM.Create(JNI_VERSION_1_8);
Options[0].optionString := '-Dfile.encoding=utf-8';
Options[1].optionString := '-Djava.class.path=.';
VM_args.version := JNI_VERSION_1_8;
VM_args.options := @Options;
VM_args.nOptions := 2;
VM_args.ignoreUnrecognized := TRUE;
errorcode := JVM.LoadVM(VM_args);//crash `