Re: Calling JVM from a C program

From: Chris Uppal (chris.uppal_at_metagnostic.REMOVE-THIS.org)
Date: 07/27/04


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



Relevant Pages

  • Re: RubyOnRails and Intraweb
    ... What does AJAX or a Web site have to do with sticking design in a Database? ... Another difference might be if you are using a Client/Server approach, where the Client is a true rich client running inside/outside the browser, and downloaded to the local machine and using HTTP as the transfer protocol, much like a Flash, Java Applet, or Java Web Start application. ... I still do not know how you can control the basic framework they are using, because I do not know what the basic framework is. ... Click on the XHTML tags, add your Java Script code, code your JS functions, point to your server, and then within the IDE, debug the application; ...
    (borland.public.delphi.non-technical)
  • Re: I need Intel iMac Info
    ... As with most things on the Mac, ... I don't necessarily need to a web site design program as all of the ... If it will work on the Intel iMac I would be happy to pay the steep ... >> It is crucial that any new machine within our office have Java ...
    (comp.sys.mac.system)
  • Re: I need Intel iMac Info
    ... > We use an OS/2 computer to pipe MP3 music files through the office ... > web site service. ... > these web site directories under an OS X operating system on an iMac? ... > It is crucial that any new machine within our office have Java ...
    (comp.sys.mac.system)
  • Re: I need Intel iMac Info
    ... > web site service. ... > these web site directories under an OS X operating system on an iMac? ... I need to convert those VHS videos over to ... > It is crucial that any new machine within our office have Java ...
    (comp.sys.mac.system)
  • Re: Cant access this web site :(
    ... The Problem is that When I try to access a web site ... Another way of accessing this same java control is through ... opens but the java control still doesn't come up. ... v: dump thread stack ...
    (microsoft.public.windowsxp.help_and_support)

Loading