Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make an operating system using java?

I wanna know is it possible to make an operating like windows-xp which is written in C language like can I write that in java so that I will have same features as written in C

like image 466
giri Avatar asked Jan 01 '10 08:01

giri


People also ask

Can I create OS with Java?

Yes, you can. Many options available to do so: JNI provides communication of Java code with native code. you can develop boot loader in native code, but UI in Java.

Why Java is not used in operating system?

Device drivers: Device drivers can talk to kernel via system calls. But, the existing operating systems are not written in Java. It is because, Java is not an efficient language particularly due to garbage collection that can cause arbitrary latencies.

Is Java a operating system?

Most platforms can be described as a combination of the operating system and underlying hardware. The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms. The Java platform has two components: The Java Virtual Machine.

Can a software be developed in Java so that it runs in any OS?

Java is Platform independet. This says it all.It can run on any operating system because it compiles to bytecode which then runs on a Virtual machine.


1 Answers

In theory yes, but you'll still have to have some low-level assembly code to bootstrap the Java VM that will run on the machine, and also low-level code for accessing hardware drivers.

From wikipedia:

Given that Sun Microsystems' Java is today one of the most dominant object-oriented languages, it is no surprise that Java-based operating systems have been attempted. In this area, ideally, the kernel would consist of the bare minimum required to support a JVM. This is the only component of such an operating system that would have to be written in a language other than Java. Built upon that JVM and basic hardware support, it would be possible to write the rest of the operating system in Java; even parts of the system that are more traditionally written in a lower-level language such as C, for example device drivers, can be written in Java.

Examples of attempts at such an operating system include JX, JNode and JavaOS.

like image 153
Eli Bendersky Avatar answered Sep 24 '22 20:09

Eli Bendersky