Article View: borland.public.jbuilder.java.api
Article #2556Re: How can I access C++ dll from Java
From: Joi Ellis
Date: Thu, 19 Oct 2000 00:00
Date: Thu, 19 Oct 2000 00:00
20 lines
1450 bytes
1450 bytes
pnichols <pwnichols@mail.gw.total-web.net> wrote:
> I am not sure whether you can do this or not either (without extra C
> coding), but all pchars are /0 terminated...They are, as well, pointers to a
> character based string (actually array of chars).
Java string objects are not null-terminated, and they are stored in
a Unicode format which must be translated back to the platform's
native encoding before it can be used.
You need a JNI Glue layer to convert your Java objects and primitives
into the types required by your C++ dll..
--
Joi Ellis Software Engineer
Aravox Technologies joi@aravox.com, gyles19@visi.com
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
Technical Details
Message-ID:
<8sn41r$cnf7@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8rcma4$8je8@bornews.borland.com> <39eea559_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,1f62b3b052d8a190
X-Google-Attributes: gid1089d0,public
From: Joi Ellis <joi@joi.aravox.com>
Subject: Re: How can I access C++ dll from Java
Date: 2000/10/19
Message-ID: <8sn41r$cnf7@bornews.borland.com>
X-Deja-AN: 683434175
References: <8rcma4$8je8@bornews.borland.com> <39eea559_1@dnews>
Organization: Another Netscape Collabra Server User
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i686))
Newsgroups: borland.public.jbuilder.java.api