Received: from SOUTH-STATION-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA28566; Wed, 20 Dec 95 14:31:44 EST
Received: from liquor.cabi.net by MIT.EDU with SMTP
	id AA12519; Wed, 20 Dec 95 14:31:44 EST
Received: (from listadm@localhost) by liquor.cabi.net (8.6.12/8.6.12) id NAA04587; Wed, 20 Dec 1995 13:35:38 -0500
Resent-Date: Wed, 20 Dec 1995 13:35:38 -0500
X-Sender: chapman@saul3.u.washington.edu
Date: Wed, 20 Dec 1995 10:33:17 -0800 (PST)
From: Randy Chapman <chapman@u.washington.edu>
To: Dave Dittrich <dittrich@cac.washington.edu>
Cc: Byron Rakitzis <byron@netapp.com>, java-linux@java.blackdown.org
Subject: Re: native methods on Linux?
In-Reply-To: <9512201804.AA09016@red3.cac.washington.edu>
Message-Id: <Pine.OSF.3.91l.951220102922.9482D-100000@saul3.u.washington.edu>
Foo: foo-bar
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Resent-Message-Id: <"MQSv-3.0.-51.dR5sm"@liquor>
Resent-From: java-linux@java.blackdown.org
X-Mailing-List: <java-linux@java.blackdown.org> archive/latest/771
X-Loop: java-linux@java.blackdown.org
Precedence: list
Resent-Sender: java-linux-request@java.blackdown.org

On Wed, 20 Dec 1995, Dave Dittrich wrote:

> > Hi, I am a newcomer to Java and Linux both. I would like to compile
> > native methods for java-linux, but I am having a hard time puzzling
> > things out.
> 
> There are no such things as "native" methods with Java.

I beg to differ.  AWT is an excellent example of native methods.
As are the network access routines.  And the sound routines.

And you can make your own.  See http://java.sun.com

> > First of all, there do not seem to be linux-dependent header files,
> > the equivalent of "include/solaris/typedefs_md.h". I am making my best
> > guess at what the linux equivalent should be, mostly the uncertainties
> > lie in the details of 64 bit int support.
> 
> Get a copy of the Java spec (from http://java.sun.com) and it will
> tell you all the specifics.  Java was designed such that there is
> nothing that will vary from platform to platform.

Yes, it does cover all the specifics.  Including exactly how to make
native libraries and load them, both on Solaris and Win32.  Note that
loading them is the same on both platforms (java.lang.System.loadLibrary)

And, yes, they are non-portable.

--randy

