Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3BF1BC80.3030707@home.com> Date: Tue, 13 Nov 2001 19:36:16 -0500 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 AT cygwin DOT com Subject: Re: Calling JVM from cygwin References: <3BEFCA9B DOT 6000904 AT netcom DOT es> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 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. > > 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/