Calling JVM from cygwin
Pasch, Thomas (ACTGRO)
extern.thomas.pasch@volkswagen.de
Wed Feb 13 08:17:00 GMT 2002
Some time ago, Ignasi Villagrasa wrote:
> [...]
> I built following .bat file:
> gcc -c invoke.c -Id:\jdk1.3.1\include -Id:\jdk1.3.1\include\win32 DLLTOOL
--dllname jvm.dll --def libjvm.def \
> --output-lib d:\jdk1.3.1\jre\bin\classic\libjvm.a c++ -o invoke.exe
invoke.o -Ld:\jdk1.3.1\jre\bin\classic -ljvm
>
> with libjvm.def :
>
> EXPORTS
> _imp__JNI_GetDefaultJavaVMInitArgs@4
> _imp__JNI_CreateJavaVM@12
>
> All seems to work fine, and invoke.exe is generated. But when trying to
run it, I get a windows message telling me : invoke.exe
> doesn't find the entry point to _imp__JNI_CreateJavaVM@12 in jvm.dll.
> [...]
Hello,
you are right, there seems to be problem in invoking java from cygwin
(the other way round works all right). It seem that mingw is doing a
better job here.
Perhaps http://www-106.ibm.com/developerworks/java/library/j-jnidebug/
is interesting for all. Code examples are included here as well. I can't
get invocation.zip to work under cygwin. It compiles all right, but
invoking main.exe will lead to a Segmentation fault.
Anyway, your *def file is wrong. Should be something like:
EXPORTS
JNI_CreateJavaVM
JNI_GetCreatedJavaVMs
JNI_GetDefaultJavaVMInitArgs
Kind regards,
Thomas
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list