Messages in this thread | | | Subject | Re: Java in OS? | Date | Fri, 03 May 1996 08:09:10 -0400 | From | "Michael K. Johnson" <> |
| |
Mike Shaver writes: >Thus spake Michael K. Johnson: >> No, not a daemon. Just make Java an executable file format that >> uses an interpreter. Essentially the same as a shell script, ... > >How would you specify where to find the interpreter? Compiled Java >doesn't have comments, so you couldn't use the #!-style approach. > >Hard-code it in, perhaps as a config option?
I see two ways to do this. One is to hard code it. We've already got several paths hardcoded in the kernel, and adding one more wouldn't hurt anything. It could be run-time changeable through /proc if simple hard-coding bothered people. There are lots of options there. This was the way I was thinking of when I wrote the text quoted above.
Another way is to use the ELF file format. Have a program which turns a Java app into an ELF file, which could use the fact that ELF can have sections with any name you choose (if that turns out to be convenient), and have it load the java interpreter as its interpreter. Most of the interpretation would be done in a shared library, I imagine. To be fair, the utility should also be able to unwrap the java app back to its "pure" form that it started in.
Either would be sufficient; there are arguments for each. I like the second way better, I think; it would show off nicely why the Linux community is moving to ELF.
michaelkjohnson
| |