delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <3BEFCA9B.6000904@netcom.es> |
Date: | Mon, 12 Nov 2001 13:11:55 +0000 |
From: | Ignasi Villagrasa <gri AT netcom DOT es> |
Organization: | gri |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:0.9.2) Gecko/20010726 Netscape6/6.1 |
X-Accept-Language: | es-es |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Calling JVM from cygwin |
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 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |