public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: David Pettersson <dapet@mai.liu.se>
Cc: java-discuss@sourceware.cygnus.com
Subject: Re: Proposal for CNI/JNI problems
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <m2ogarrn6o.fsf@magnus.bothner.com> (raw)
In-Reply-To: <Pine.OSF.4.00.10001120853160.1873-100000@bloodgood.mai.liu.se>

David Pettersson <dapet@mai.liu.se> writes:

> I think there are two problems if JNI C interface is not supported. 

We are talking about the classpath *implementation*, not whether
JNI should be supported.  There are two separate issues:

(1) Supporting JNI code written in C.  such code can be compiled with
any C compiler, resulting an object file using the JNI ABI.
Implementing JNI is a task that needs to be supported by JVM run-time.
(Gcj will probably also use compile-/link-time tools to implement
JNI.)

(2) Writing libraries that can be invoked using either JNI or CNI.
This requires conditional compilation and/or a smart compiler.
Using pure conditional compilation would allow full portability to
any JVM and C/C++ compiler.  However, it becomes very tedious and
ugly, and you give up the simplicity of CNI.  An alternative is
some kind of pre-processor.  The ultimate pre-processor is
G++, which is what I suggested.  It allows libraries to maintain
(most of) the simplicity of CNI, while still producing code that
is binary compatible with JVMs that only understand JNI.

The discussion is about (2).

> Classpath will not be able to compile with other C compilers.

True.

> Classes that use JNI can not be used with gcc/gcj.

False.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

  reply	other threads:[~2000-04-01  0:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-01  0:00 David Pettersson
2000-04-01  0:00 ` Per Bothner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-04-01  0:00 Boehm, Hans
2000-04-01  0:00 Paul Fisher
2000-04-01  0:00 ` Per Bothner
2000-04-01  0:00   ` Bernd Kreimeier
2000-04-01  0:00     ` Per Bothner
2000-04-01  0:00       ` Bernd Kreimeier
2000-04-01  0:00         ` Per Bothner
2000-04-01  0:00           ` Bernd Kreimeier
2000-04-01  0:00             ` Per Bothner
2000-04-01  0:00               ` Bernd Kreimeier
2000-04-01  0:00                 ` Per Bothner
2000-04-01  0:00                   ` Bernd Kreimeier
2000-04-01  0:00                   ` Alexandre Oliva
2000-04-01  0:00   ` Jochen Hoenicke
2000-04-01  0:00     ` Per Bothner
2000-04-01  0:00     ` Stuart Ballard
2000-04-01  0:00     ` Jon Olson
2000-04-01  0:00   ` Paul Fisher
2000-04-01  0:00     ` Aaron M. Renn
2000-04-01  0:00       ` Stuart Ballard
2000-04-01  0:00         ` Chris Blizzard
2000-04-01  0:00           ` Chris Blizzard
2000-04-01  0:00     ` Per Bothner
2000-04-01  0:00 Lam.Mark
2000-04-01  0:00 ` Aaron M. Renn
2000-04-01  0:00   ` Brian Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ogarrn6o.fsf@magnus.bothner.com \
    --to=per@bothner.com \
    --cc=dapet@mai.liu.se \
    --cc=java-discuss@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).