🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8751

Re: JNI in 1.1 and 1.2

#8751
From: John McGrath TeamB
Date: Fri, 02 Mar 2001 08:39
44 lines
2673 bytes
On Thu, 01 Mar 2001 11:03:54 +0200, Janne Johansson wrote:

> I'm sure about the loadLibrary. If you use folder separators
> in 1.2 and above you get an exception telling that separators
> are not allowed but the resource must be found in the path.
> If you specify only the name of the resource in the 1.1 DLL
> will not be loaded either.
I just wrote some test code, and I see that there is a difference in 
the behavior of both System.load() and System.loadLibrary().  The 
change came with Java 1.2, and Java 1.3 works the same as Java 1.2.

Java 1.1 would accept and handle paths in the loadLibrary() call.  It 
would also handle relative paths in the load() call, and search the 
library path if no directory was specified.  And it would append the 
appropriate extension for the load() call if it was not specified.

But in all cases, when you call the methods as documented, they work 
correctly -- exactly the same in Java 1.1, 1.2, and 1.3.  The correct 
way to call these methods is:

   System.loadLibrary( String name );
       The argument should be a simple name, such as "MyLibrary".
       System.loadLibrary will append the appropriate extensions
       based on the platform (e.g. append ".dll" for Windows,
       ".so" for Unix, etc.), and then search for a file by that
       name in the library search path.
   System.load( String fileName );
       The argument should be a absolute file specification string,
       including the full directory path and the extension.


> And about the jni-12.html, those are enhancements, not changes.

Hmmmm...  Enhancements that don't change anything.  That's a novel 
concept.  :o)

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.15090b93ee23267989ff0@forums.borland.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
References: <3A9D23B9.79D8E404@datex-ohmeda.com> <MPG.1507cd51735bbbf1989fe5@forums.borland.com> <3A9E107A.CF173AD@datex-ohmeda.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,493d8818565add66
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-02 00:38:07 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: JNI in 1.1 and 1.2
Date: Fri, 2 Mar 2001 03:39:25 -0500
Organization: Another Netscape Collabra Server User
Lines: 46
Message-ID: <MPG.15090b93ee23267989ff0@forums.borland.com>
References: <3A9D23B9.79D8E404@datex-ohmeda.com> <MPG.1507cd51735bbbf1989fe5@forums.borland.com> <3A9E107A.CF173AD@datex-ohmeda.com>
NNTP-Posting-Host: dslcv1-60.fast.net
X-Newsreader: MicroPlanet Gravity v2.30