Page 1 of 1

porting SSCLI and OpenJDK

Posted: Tue Jun 16, 2009 12:43 am
by redoktober
heylo!
again, this may sound noob.
but then, i had to ask!

is it possible, that by porting Microsoft's SSCLI, and Sun's OpenJDK, i can create a minimal development environment on my operating system, so that the end-user can create a small program, compile it and be able to run it?
the only problem is, the SSCLI and the OpenJDK are sub-sets of their mother frameworks. not all features are present. so if i wish to have a full-blown .NET SDK, and a full-blown J2SDK inside my OS, how would i go about that?

by the way, my OS is being written primarily in x86 Assembly, and C++. if the stuff above works out, then i may even plan on re-writing some drivers and so on, in managed code!

thanks!

Re: porting SSCLI and OpenJDK

Posted: Tue Jun 16, 2009 8:37 am
by NickJohnson
What state is your OS in? At least Java is just a program, so porting it would be just like porting anything else - you could then use it as an interpreter for the rest of the userland - assuming you have some sort of reasonable ABI and a working loader that supports interpreters (ELF, maybe PE).

If you want to use one of those in the kernel, and run the entire OS as managed code, it would be a lot trickier. You would essentially have to port them to the bare hardware, make modifications that allow multiple concurrent VMs in one implementation and give some sort of protection system, so you can then write the kernel as managed code.

There are really varying levels of how you integrate a VM into your system... could you be more specific?

Re: porting SSCLI and OpenJDK

Posted: Wed Jun 17, 2009 1:28 am
by redoktober
<embarassed.>
:?

i guess i might as well be truthful.
see, i haven't progressed further than a small kernel, which accepts a user-name and password from the keyboard.
:oops:

but yeah, my plan is to enable the OS to load and execute an ELF file.
then, i plan to write some small (read: tiny) applications, just to test this part.
then, i want to port over the SSCLI and the OpenJDK. so that, after all this work, i can create a small code listing in, say, C# or Java, and then be able to compile it, and run it.

hehehe....i warned you that i'm asking one stupid question...

anyway, thanks, man!

Re: porting SSCLI and OpenJDK

Posted: Thu Jun 18, 2009 5:54 pm
by AndrewAPrice
Can I recommend Mono?

It's extremely simple to port. I haven't ported it to my OS, but I have ported it to near bare-metal consoles.

Re: porting SSCLI and OpenJDK

Posted: Thu Jun 18, 2009 10:26 pm
by redoktober
hmm....you know what?
that sounds cool!

well, yeah.
that way...yeah, it's an awesome idea!
thanks, man!
:)