Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JNI, invoking javaVM through native

843829Jul 14 2002 — edited Jul 22 2002
Hi 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)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2002
Added on Jul 14 2002
4 comments
153 views