Is there any way to write an operating system in Java? I know it's possible to use C, but I prefer Java. It's easier to use.

Re: OS programming in Java? 80 80

A small portion of the OS would need to be written in assembly, beyond that it's theoretically possible to use Java, though I'm not sure if it's been attempted.

Re: OS programming in Java? 80 80

You would probably wind up using JNI(think that's the right now), and a lot of other third party api's and such...Just my guess though.

Re: OS programming in Java? 80 80

just remember that you'd probably have to code your own jvm into the OS somehow

Re: OS programming in Java? 80 80

Dogtree- Yeah, I know that, same as with C.
server_crash- Yeah, I know that, same as with C.
Phaelax- Yeah, I know that, same as with C. :)
Actually, I was looking at Kaffe. Does anyone know of a JVM written in C or assembly that doesn't require things such as stdio.h? (which I apparently can't write, BTW)

Re: OS programming in Java? 80 80

Found one- I'm just going to modify jNode.

Why... of course that isn't a JNode code snippet.. what a coincidence that the same exact code shows up in jNode and my OS!


PS: I need a name for it now.

Re: OS programming in Java? 80 80

If you have hardware with a JVM built into it (which is possible) you can indeed write the rest in Java.

Re: OS programming in Java? 80 80

PS: I need a name for it now.

Name it after me.


PS: I wrote Windows XP in java(not many know this), so if you need any help you can contact me.

Re: OS programming in Java? 80 80

Hi everyone,

PS: I wrote Windows XP in java(not many know this)

Is this really true?? Did you also write the kernel in java??
What about the networking part(talking to the modems using java)??

What about disk partining and formatting - were these codes also written in java??

Can your OS support most of the hardware on the market??


If you have really created something like that i think you should open-source it so people could further develop it as i think that such an OS could be very beneficial to the computer world.

It would really be great to hear a reply from you on this topic

Thank You

Yours Sincerely

Richard West

Re: OS programming in Java? 80 80

server_crash: No, that would imply that it crashes when used as a server. :( But I might need a little help. It will be open source, probably under the GPL.

Re: OS programming in Java? 80 80

You people actually believed that I wrote XP? Did you know that I also invented the internet(Not many know that either)?

Re: OS programming in Java? 80 80

Actually, no, I didn't believe that. But I do know that you're good with Java...

Re: OS programming in Java? 80 80

And I built ENIAC :)

(now take a guess at how old I am... just kidding)

Re: OS programming in Java? 80 80

Update: It will be a Linux distro with most of the tools written in Java. I still need a name...

w00t (what's that mean anyway?) I'm now a "Posting Whiz" :)

Re: OS programming in Java? 80 80

Update: It will be a Linux distro with most of the tools written in Java. I still need a name...

w00t (what's that mean anyway?) I'm now a "Posting Whiz" :)

What are you thinking? Name it after me...

By the way, get some more traffic to your forum so I can start posting again.

Re: OS programming in Java? 80 80

Start telling people about it :)
Like I said, naming it after you would imply that it would crash when used as a server...

Re: OS programming in Java? 80 80

How long do you think this will take you?

Re: OS programming in Java? 80 80

Until I can get a Linux distro to install... plus a few weeks.

BTW, I just got a PM asking for advertising at Compuchat :)

Re: OS programming in Java? 80 80

ohhh that's good. I'll visit and click on the ads as often as I can.

Re: OS programming in Java? 80 80

http://nerdlib.com/index_enter.php
The link that says "Free computer help forum." :)
*does victory dance*

Re: OS programming in Java? 80 80

Update: I'm back to writing the OS again. Eventually, I'll at least get it to boot... then I'll worry about the Java part. All it does now is say "Loading MikeOS... Boot failed."

I didn't finish the kernel yet :( Anybody know C?

Re: OS programming in Java? 80 80

so what language did you use when you dont know c?

Re: OS programming in Java? 80 80

Java.
(duh :)

Re: OS programming in Java? 80 80

You need to post screenshots of your work in progress.

Re: OS programming in Java? 80 80

<table bgcolor="black">
<tr><td>
<font color="white">Loading MikeOS...
Boot failed - kernel not found.
</font>
</td></tr>
</table>
I haven't gotten the kernel to compile yet :(

Re: OS programming in Java? 80 80

Update: The kernel (which is now C++, java support will be added later) just compiled!

Re: OS programming in Java? 80 80

How do you actually implement the code on a bare bones system? I mean, will the code run from a cd and know everything to do from there?

Re: OS programming in Java? 80 80

I'm still working on it. I haven't quite figured out how to take a screenshot in text mode, but I just booted it from a floppy and it said "Hello World!" and hung. That was written in C++ though.

EDIT: I misunderstood the question. To make the code run without an OS, you have to write a "stub" program in assembly.
(Or do what I did, take an existing one and change the name of the file that it loads :)) Not sure why it's under the VB section, but here's anarticle on how to do it: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6718&lngWId=3

Re: OS programming in Java? 80 80

Hi everyone,

Okay i really thought servercrash had written winxp in java

Richard West

Re: OS programming in Java? 80 80

You can't write an OS purely in Java. I've even heard you can't do it in c/c++ either...But don't know if that's true or not.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.