Re: Calling JVM from a C program
From: Chris Uppal (chris.uppal_at_metagnostic.REMOVE-THIS.org)
Date: 07/27/04
- Next message: Andrew Thompson: "Re: applet can't read files in document base with IE & Sun Java 1.4.2"
- Previous message: Andrew Thompson: "Re: Struts Architecture"
- Maybe in reply to: Cid: "Re: Calling JVM from a C program"
- Next in thread: Jim Sculley: "Re: Calling JVM from a C program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 27 Jul 2004 15:44:53 +0100
Olivier Merigon wrote:
> Is there a solid documentation about invoking the JVM from a C program
> ? By solid I mean more than 200 words, younger than 5 years old, not a
> 100$ book. Sun's web site only offers very old and short stuff.
http://java.sun.com/docs/books/jni/
The whole book online...
You'll find that most material (including the spec and the above book) assume
that almost all users of JNI will be wanting to call C (or whatever) from Java
not the otherway around. That assumption is false in general, and -- I
suspect -- false far more often than the books would lead you to suspect.
Still, there are few aspects of using Java from C that that not lavishly
covered by the usual material. The biggest is about how to start a runtime
JVM. They break down into three categories:
- stuff that is covered briefly but (mostly) adequately in the spec and
books.
- stuff that is JVM, OS, and programming language/compiler dependent.
- stuff that should be bleeding obvious to any C programmer.
I'd advise you to first ensure that you know:
- how to do "normal" JNI programming -- invoking C from Java -- it'll
really help
keep the complexity under control if you learn one thing at a time.
- how to program, toubleshoot, and debug whatever your platform's
equivalent of a Windows DLL is.
And yes, you will need the entire JRE, mostly for technical reasons, but also
because the licence doesn't (AFIAK) permit you to bundle only /part/ of the
JRE.
-- chris
- Next message: Andrew Thompson: "Re: applet can't read files in document base with IE & Sun Java 1.4.2"
- Previous message: Andrew Thompson: "Re: Struts Architecture"
- Maybe in reply to: Cid: "Re: Calling JVM from a C program"
- Next in thread: Jim Sculley: "Re: Calling JVM from a C program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|