Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <96C14D00FA99D311A8D60008C791F36411628CA1@devwagwodx0009.wob.vw.de> From: "Pasch, Thomas (ACTGRO)" To: "'cygwin AT cygwin DOT com'" , "'gri AT netcom DOT es'" Subject: Re: Calling JVM from cygwin Date: Wed, 13 Feb 2002 17:17:12 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain 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 AT 4 > _imp__JNI_CreateJavaVM AT 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 AT 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/