JNI, invoking javaVM through native
843829Jul 14 2002 — edited Jul 22 2002Hi Java Soft team,
I really enjoy working in Java . It is really a great technology that sun has brought. Right now I have some problems with JNI.
I want to invoke JavaVM from native(in C). my main aim is to run my java application through native. For code trial, I have used the native �invoke.c� available in tutorial, but building .exe file in VC++6.0, I am getting error(s). Please tell me where the problem is and how can it be solved.
After build button is pressed in VC++6.0 tool bar, the following error(s) are shown.
Note : jni.h, jni_md.h & javai.lib are in path.
Compiling�
Invoke.c
c:\invoke.c(34):warning c4047: �function�: �void **� differs in level of indirection from �const struct JNIInterface__***�
c:\invoke.c(34): warning C4022: �JNICreateJavaVM�: pointer mismatch for actual parameter 2.
Invoke.obj � 0 error(s), 2 warning(s)
Linking�
Invoke.obj: error LNK 2001: unresolved external symbol __imp__JNICreateJavaVM@12
Invoke.obj: error LNK 2001: unresolved external symbol __imp__JNIGetDefaultVMInitArgs@4
Debug/invoke.exe: fatal error LNK 1120: 2 unresolved externals.
Error executing link.exe.
Invoke.exe � 3 error(s), 2 warning(s)
Thanking you.
Shirish
(Bangalore, INDIA)