Calling a Java function from C++ using CNI
Per Bothner
per@bothner.com
Tue Aug 10 16:41:00 GMT 2004
Shaun Jackman wrote:
> I don't believe this is true.
Believe it. Why do you ask a question, and don't believe people who
have a lot more experience than you? I suggest you read the link
Ranjit gave.
> Since the Java source is compiled to
> native code, there's no need to create a VM as there is no byte code
> to interpret.
Ranjit didn't write "VM", he wrote "runtime". It does need to be
initialized.
Now we could be more clever have have the runtime be automatically
be initialized, by various places checking to see if it has been
initialized, and if not, automatically calling the necessary routines.
Whether that would be a good idea could be discussed. But for now
the runtime must be explicitly initialized.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Java
mailing list