[JNI Wrapper for Delphi]라는 건데
http://sourceforge.net/projects/djbridge/files/jniwrapper/
여기서 받았구요.
영어가 짧아 일일히 번역은 못하겠지만 대충 아는 단어들로만 짐작해 보면
델파이에서 자의 JNI를 사용할 수 있다는 이야기인 듯 합니다.
샘플예제가 몇개 있긴 하지만 컴파일 해보면 에러가 나는데
영어도 짧은데다가 델파이까지 짧아 어디를 수정해야 할지 몰라 테스트도 못해봤습니다.
JavaRuntime.pas에서
const
PLUGIN_11_KEY = '\SOFTWARE\JavaSoft\Java Plug-in\1.1';//Home
IBM_JRE_11_KEY = '\SOFTWARE\IBM\IBM WIN32 Runtime Environment, Java(TM) Edition';
IBM_JDK_117_KEY = '\SOFTWARE\IBM\IBM WIN32 Developer Kit, Java(TM) Edition\1.1.7';
IBM_JDK_118_KEY = '\SOFTWARE\IBM\IBM WIN32 Developer Kit, Java(TM) Tech. Edition\1.1.8';
JRE_11_KEY = '\SOFTWARE\JavaSoft\Java Runtime Environment\1.1'; //JavaHome, Microversion
JB_KEY = '\SOFTWARE\JavaSoft\Java Runtime\1.1.6'; //JavaHome
JDK_11_KEY = '\SOFTWARE\JavaSoft\Java Development Kit\1.1'; //JavaHome, Microversion
JRE_12_KEY = '\SOFTWARE\JavaSoft\Java Runtime Environment\1.2'; // JavaHome, RuntimeLib
JRE_13_KEY='\SOFTWARE\JavaSoft\Java Runtime Environment\1.3';
JRE_14_KEY='\SOFTWARE\JavaSoft\Java Runtime Environment\1.4';
PLUGIN_12_KEY = '\SOFTWARE\JavaSoft\Java Plug-in\1.2'; // JavaHome, RuntimeLib
PLUGIN_13_KEY = '\SOFTWARE\JavaSoft\Java Plug-in\1.3'; // JavaHome, RuntimeLib
PLUGIN_14_KEY = '\SOFTWARE\JavaSoft\Java Plug-in\1.4';
JDK_12_KEY = '\SOFTWARE\JavaSoft\Java Development Kit\1.2'; //JavaHome, Microversion
JDK_13_KEY = '\SOFTWARE\JavaSoft\Java Development Kit\1.3';
JDK_14_KEY = '\SOFTWARE\JavaSoft\Java Development Kit\1.4';
JRE11Keys : array[1..3] of String = (PLUGIN_11_KEY, IBM_JRE_11_KEY, JRE_11_KEY);
JDK11Keys : array[1..4] of String = (IBM_JDK_118_KEY, IBM_JDK_117_KEY, JDK_11_KEY, JB_KEY);
JRE12Keys : array[1..6] of String = (JRE_13_KEY, PLUGIN_13_KEY, JRE_12_KEY, PLUGIN_12_KEY, JRE_14_KEY, PLUGIN_14_KEY);
이 부분을 수정하면 될 것 같기도 하고....
고수님들께서 확인해 보시고 에러 수정과 자세한 설명까지 해 주시면 감사하겠습니다.
.....
.....
•TJavaRuntime is an encapsulation of the JNI Invocation API. In most cases, you will get an instance of this class by calling the class method GetDefault.
•TJavaParams is an encapsulation of the list of parameters passed to a Java method.
•TJavaObject is an encapsulation of a Java object.
•TJavaClass is an encapsulation of a Java class.
•TJavaMethod is an encapsulation of a Java method.
...........
..........
Contents of archive:
• JNI.pas -- translation of the jni.h file in the Sun JDK to Pascal.
• JNIWrapper.pas -- delphi source code containing object pascal class wrappers for JNI handles.
•JavaRuntime.pas -- delphi source code containing object pascal class TJavaRuntime that provides an easy-to-use wrapper around the JNI invocation API.
• JUtils.pas -- Source of various routines used here and there.
• JTest*.dpr -- These files contain delphi source of demos that show how to use the JNIWrapper.pas code in your programs.
• HelloWorld.java -- the source to a Java program that is used in JTest demos.
• native.dpr -- Source for a trivial DLL written in Delphi to demonstrate a native call to delphi from Java. The Java part of this demo is in the file NativeExample.java
• Bothways.dpr -- This provides an example in which Delphi code calls Java code and then viceversa!
• build.bat -- A command-line batch file which compiles all the included source files. It is assumed that you have the Delphi command line compiler DCC32.exe and the default Java command-line compiler javac.exe on your system path. Note: This code compiles with Delphi 4. I haven't tried it with any later version. Please tell me if there is a problem.