Thanks for the replies,
I read deeper and recalled my previous kernel experiences. The simple
answer, as both of you mentioned, is "you can't do that". Basically, you
can only link to functions that are in kernel space, you can't "add"
dependencies except those that are in your module.
The JNI_ call starts a JVM, it is not a call available in kernel space, it
is a .so available with the JDK (not a kernel module). You link it into
user space code.
I thought a while about adding a "pipe" to a running JVM, similar to that
which another gentleman pointed me to. Unfortunately, I was hoping to call
methods in a JVM to take advantage of RMI to simplify socket communications
:-) Basically....cheat. By using Java code I would be able to create
intermediate objects that are more easily maintainable by the general
population....A message layer may serve this purpose, but add enough
overhead and complexity that the kernel code itself would become its own
little mess, combined with the performance degradation of adding the
message layer (in addition to the JNI layer).
Well....since I don't have time to write a message layer....I guess I'm
back to C socket calls.
Thank you for the responses.
Paul
Joi Ellis <[EMAIL PROTECTED]> on 10/18/2000 05:01:04 PM
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject: Re: Using JNI from kernel module
On Wed, 18 Oct 2000 [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to use JNI from a kernel module. One of the first things I
have
> to do when the module is initialized is create a JVM, to do this I use
the
> JNI_CreateJavaVM method that is #included from jni.h. Needless to say,
> when I do an insmod I receive:
>
> CRBD.o: unresolved symbol JNI_CreateJavaVM
>
> Does anyone have any suggstions for how to do this, or a flat out "you
> cannot do that"?
Hrm. You're trying to put a JVM into the kernel space? I have no idea
if that would work or not. But, I know there's a project to put a
web server into kernel space. Perhaps putting a JVM into kernel space
is possible. I'm not a kernel geek...
Try using modprobe instead of insmod. modprobe attempts to resolve
module inter-dependancies. IE, if I try to insmod bw_qcam, it whines about
video support symbols. It loads fine if I use modprobe bw_qcam instead.
Is the thingy which implements JNI_CreateJavaVM also a module?
Is it in the kernel's module path?
--
Joi Ellis Software Engineer
Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED]
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]