Is it possible to make an operating system using java?

后端 未结 7 926
心在旅途
心在旅途 2020-12-01 12:06

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

相关标签:
7条回答
  • 2020-12-01 12:26

    As others mentioned above, it has already been attempter. Jnode is the only one that has withstood the test of time and is being actively worked on though they haven't released a new build in years. But if you look at their Git commits, they're working on an imminent release as I write this. I'm a fan of Java and look forward to the release. People who hate verbose imperative languages like Java cringe at the idea but it's not for everyone.

    Interesting too is the idea of implementing Java byte code in hardware. I don't think that will go anywhere as the strength of Java is that you don't need to worry much about hardware. You just need to get a OS in Java and it can be run on any JVM.

    I think the true power of Java in the OS domain is virtualisation. I can't think of a better way to have a virtual OS as Java is everywhere.

    As other posters noted above, it can't be implemented completely in Java without a Java hardware implementation. Jnode is completely written in assembly and Java. But then all modern operating systems use some assembly language.

    0 讨论(0)
  • 2020-12-01 12:28

    operation systems are closer to the hardware (like drivers). in my view this it not the area of Java (just the wrong solution of the problem domain operating-system).

    0 讨论(0)
  • 2020-12-01 12:35

    http://www.jnode.org

    0 讨论(0)
  • 2020-12-01 12:38

    In theory, you could actually write the entire OS in Java with a Java processor. Basically it uses Java bytecode as the instruction set for the processor

    0 讨论(0)
  • In theory, yes. But you would need to somehow get the Java VM running using low-level code (unless you want to compile Java down to assembly, which probably isn't possible without sacrificing a lot of Java's features).

    0 讨论(0)
  • 2020-12-01 12:46

    It depends on what you consider "features". If you mean graphical interface, fancy window effects, etc. then yes, although you will need assembly language or C for the very lowest bits (i.e., interfacing with I/O ports, etc.). If you also include the Windows ABIs as a feature then it gets harder since they follow Pascal calling conventions.

    0 讨论(0)
提交回复
热议问题