This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-01-17 11:34:14

theprogrammerpro
New Scratcher
Registered: 2012-09-01
Posts: 79

OS in Java

Just out of curiosity is it possible to code an Operating system in java

Offline

 

#2 2013-01-17 12:47:09

Zeusking19
Scratcher
Registered: 2011-07-10
Posts: 1000+

Re: OS in Java

No offence, but if you think java is a good operating system language, then you are out of your mind.

Use c++ or assembly


http://i49.tinypic.com/2w7e1jm.pnghttp://dragcave.net/image/eFGFz.gifhttp://dragcave.net/image/9hE5q.gif

Offline

 

#3 2013-01-17 13:08:36

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: OS in Java

It's probably quite possible to make a "toy" OS like the ones often made in Scratch, with actual file managing. But it'd be pretty complicated still, and not worth it considering the high-level-ness of the Java VM (i.e. interfacing with hardware would be hard, and you'd end up relying a lot in external libraries).


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#4 2013-01-17 16:22:53

pwiter
Scratcher
Registered: 2010-06-02
Posts: 100+

Re: OS in Java

Zeusking19 wrote:

No offence, but if you think java is a good operating system language, then you are out of your mind.

Use c++ or assembly

You can also use C.

Also, Java is uses memory inefficently, but it has been done.JNode


http://i.imgur.com/YBeXc.png

Offline

 

#5 2013-01-17 16:25:08

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: OS in Java

Erm… a large portion of Android OS is written in Java. So yes. However, writing an operating system is not a small project.

Last edited by nXIII (2013-01-17 16:26:28)


nXIII

Offline

 

#6 2013-01-17 16:35:10

pwiter
Scratcher
Registered: 2010-06-02
Posts: 100+

Re: OS in Java

nXIII wrote:

Erm… a large portion of Android OS is written in Java. So yes. However, writing an operating system is not a small project.

Well the Android OS is based off linux which is NOT written in Java. But yeah, the GUI and apps are written in Java.


http://i.imgur.com/YBeXc.png

Offline

 

#7 2013-01-17 16:43:15

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: OS in Java

Android merely converts Java bytecodes to another kind of bytecode, designed to run efficiently on mobiles, in the Dalvik VM. Thus, only Android applications can be written in Java, while the OS and the kernel are in the device's native code.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#8 2013-01-17 16:48:09

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: OS in Java

technoguyx wrote:

Android merely converts Java bytecodes to another kind of bytecode, designed to run efficiently on mobiles, in the Dalvik VM. Thus, only Android applications can be written in Java, while the OS and the kernel are in the device's native code.

I said "a large portion," i.e., a large portion of the system applications as well as almost all the installable applications and some other stuff. I didn't say it was entirely written in Java, as it's not.

Last edited by nXIII (2013-01-17 16:48:45)


nXIII

Offline

 

#9 2013-01-17 17:30:34

pwiter
Scratcher
Registered: 2010-06-02
Posts: 100+

Re: OS in Java

nXIII wrote:

technoguyx wrote:

Android merely converts Java bytecodes to another kind of bytecode, designed to run efficiently on mobiles, in the Dalvik VM. Thus, only Android applications can be written in Java, while the OS and the kernel are in the device's native code.

I said "a large portion," i.e., a large portion of the system applications as well as almost all the installable applications and some other stuff. I didn't say it was entirely written in Java, as it's not.

Basically it is not running on java, but, its Launcher and apps are written in java.


http://i.imgur.com/YBeXc.png

Offline

 

#10 2013-01-17 18:55:35

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: OS in Java

pwiter wrote:

Basically it is not running on java, but, its Launcher and apps are written in java.

…I know. I never said it was.


nXIII

Offline

 

#11 2013-01-22 05:02:17

markbosell
New Scratcher
Registered: 2013-01-19
Posts: 2

Re: OS in Java

theprogrammerpro wrote:

Just out of curiosity is it possible to code an Operating system in java

I have read operating system full theory.  So In the theory about operating system, Yes I said, but you will still have to have some low-level set up code to bootstrap the Java VM that will run on it, and also low-level code for obtaining hardware drivers.

Offline

 

Board footer