From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6203 invoked by alias); 14 Nov 2001 00:36:53 -0000 Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Received: (qmail 6174 invoked from network); 14 Nov 2001 00:36:48 -0000 Received: from unknown (HELO femail12.sdc1.sfba.home.com) (24.0.95.108) by sourceware.cygnus.com with SMTP; 14 Nov 2001 00:36:48 -0000 Received: from home.com ([24.180.13.96]) by femail12.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011114003648.ROKH1596.femail12.sdc1.sfba.home.com@home.com>; Tue, 13 Nov 2001 16:36:48 -0800 Message-ID: <3BF1BC80.3030707@home.com> Date: Fri, 02 Nov 2001 08:39:00 -0000 From: "David A. Cobb" Organization: Excite/At-Home User via Cox User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5+) Gecko/20011112 X-Accept-Language: en-us MIME-Version: 1.0 To: Ignasi Villagrasa CC: cygwin@cygwin.com Subject: Re: Calling JVM from cygwin References: <3BEFCA9B.6000904@netcom.es> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11.t/txt/msg00141.txt Fool, rushing in where angels fear . . . . Ignasi Villagrasa wrote: > I'd like to call JVM from C native call using Cygnus compiler. > > I work in W2000 enviroment using GCC Cygnus compiler. > > I followed JNI instructions. > > I read in Java forums there was a change in JDK, and instead of > attaching javai.dll, jvm.dll had to be attached. > > Then I made a test using invoke.c example from JDK. > > 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 > Umm, are you /really/ invoking *Cygwin* tools with Windows paths? Or are you using the Mingw32 GCC that might be expected to understand "d:\jdk1.3.1\include"? Also, last I heard, the Cygwin port of GCC didn't implement any support for the Java library - if that's relevant. Or, maybe, I'm out of date :-). > > 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. > > What am I going wrong ? > > Any calling convention issue ? > > I have seen several messages about JNI linking, and tried some changes > in .def calls with no results. > > Is there anyone having the same problem ? > > Thanks in advance. Ignasi Villagrasa. > > > > > > -- > 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/ > > -- David A. Cobb, Software Engineer, Public Access Advocate, All around nice guy. New PGP key 09/13/2001: : : Fingerprint=0x{E7C6_4EE2_6B75_5BA3_C52E__77FA_63C3_9366_DCFB_229B} "By God's Grace I am a Christian man, by my actions a great sinner." --The Way of a Pilgrim, R. M. French [tr.] Potentially Viral Software is any software for which you are not allowed to examine the source. Do not buy or use Potentially Viral Software! -- 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/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6203 invoked by alias); 14 Nov 2001 00:36:53 -0000 Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Received: (qmail 6174 invoked from network); 14 Nov 2001 00:36:48 -0000 Received: from unknown (HELO femail12.sdc1.sfba.home.com) (24.0.95.108) by sourceware.cygnus.com with SMTP; 14 Nov 2001 00:36:48 -0000 Received: from home.com ([24.180.13.96]) by femail12.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011114003648.ROKH1596.femail12.sdc1.sfba.home.com@home.com>; Tue, 13 Nov 2001 16:36:48 -0800 Message-ID: <3BF1BC80.3030707@home.com> Date: Sun, 11 Nov 2001 08:26:00 -0000 From: "David A. Cobb" Organization: Excite/At-Home User via Cox User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5+) Gecko/20011112 X-Accept-Language: en-us MIME-Version: 1.0 To: Ignasi Villagrasa CC: cygwin@cygwin.com Subject: Re: Calling JVM from cygwin References: <3BEFCA9B.6000904@netcom.es> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11/txt/msg00141.txt.bz2 Message-ID: <20011111082600.3_ljTOu7PzkKlcOGBSQoiSD4G6hGlgLEM2s98lOms-A@z> Fool, rushing in where angels fear . . . . Ignasi Villagrasa wrote: > I'd like to call JVM from C native call using Cygnus compiler. > > I work in W2000 enviroment using GCC Cygnus compiler. > > I followed JNI instructions. > > I read in Java forums there was a change in JDK, and instead of > attaching javai.dll, jvm.dll had to be attached. > > Then I made a test using invoke.c example from JDK. > > 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 > Umm, are you /really/ invoking *Cygwin* tools with Windows paths? Or are you using the Mingw32 GCC that might be expected to understand "d:\jdk1.3.1\include"? Also, last I heard, the Cygwin port of GCC didn't implement any support for the Java library - if that's relevant. Or, maybe, I'm out of date :-). > > 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. > > What am I going wrong ? > > Any calling convention issue ? > > I have seen several messages about JNI linking, and tried some changes > in .def calls with no results. > > Is there anyone having the same problem ? > > Thanks in advance. Ignasi Villagrasa. > > > > > > -- > 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/ > > -- David A. Cobb, Software Engineer, Public Access Advocate, All around nice guy. New PGP key 09/13/2001: : : Fingerprint=0x{E7C6_4EE2_6B75_5BA3_C52E__77FA_63C3_9366_DCFB_229B} "By God's Grace I am a Christian man, by my actions a great sinner." --The Way of a Pilgrim, R. M. French [tr.] Potentially Viral Software is any software for which you are not allowed to examine the source. Do not buy or use Potentially Viral Software! -- 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/