It appears that a JVM running from Init 3 with its own GUI is a very good solution.
Any inputs please?
as Wikipedia says about standard runlevel, runlevel 3 is used as multi-user + network. So on most system you only have (remote) text based terminal access. If you want to step up and use graphical environment, than runlevel 5 is what you're looking for, as this runlevel is defined as multi-user + network + desktop. Also: to use a graphical desktop, you need a (desktop) window manager like X wich provides the interface between the gui code and the actual rendering on the graphics hardware.
If you don't want to run a full blown X system on runlevel 5 but keep it down to runlevel 3, then nCurses is what you should look at, as this is a text-based gui framework as used on suse yast or the installer for debian based systems.
But a java only fully blown desktop environment like X (or maybe usin X), sorry, I don't think there's such thing out there.
I was naively hoping that I would find something like what I am looking for. And that the JavaRanch would be in the right position to direct me at the right path
Can't an Open Source Initiative develop something like what I want? I am surprised as to why the jOS failed to take off or JavaOS died! A JDE would be an easier interface to build than a full-blown OS from scratch with Assembly language.
The sad part is that even the Java Desktop System is not built in Java. It is a tweaked GDE!
Java® was never intended to be an operating system language; some other languages were, particularly C.
I would apologise to disagree. Otherwise, there wouldn't have been JavaOS or jOS. Maybe, people are just happy to maintain the status quo with so many C (and C++ for KDE) systems programmers are smoothly maintaining the GNU-Linux and the Android OS.
Campbell Ritchie wrote:Java® was never intended to be an operating system language; some other languages were, particularly C.
The demand is simply not there for the jOS like there is no demand for the GNU-Hurd!
It is in the human nature to maintain the Status Quo, of the parable, The Boiling Frog, first paragraph!
Rajib, what you want can't be done.
1) You want to keep it at runlevel 3 - sorry, there's no graphical desktop down here - that's what runlevel 5 and the X system is for.
2) You want something all in pure Java - at least at some point you have to delegate to native - then you're back to C level.
3) Currently there are three major graphics toolkits: AWT, Swing and FX. All based on OS-level "native peers" providing basic interface to light up a pixel on the screen when some line of Java source says so. Writing a new system-level subsystem would require to write a new toolkit from ground up - so you can't re-use any already existing in Java.
Sorry to cut it down this way - but this isn't a one-man-stunt-show - that's something a few dozen devs maybe need couple months to get at least the first alpha go up and running - let alone the missing demand.
Maybe let me put it this way: What's the goal you want to achieve in the end? Maybe there's something already existing you could use.
There is! And that is the C programming language and GDE, KDE, LXDE, etc., at runlevel 5 and a host of packages to choose from and run.
Matt Wong wrote:... Maybe there's something already existing you could use...
I came to Java because the library API reference index is better than it is in C for creating and improvising codes. You could look at my other thread where I had asked for a shortcut, if there exists any, here: How to link separate informations on the APIs available in the Javadoc or API Web index?. Since then, I have learnt somewhat to improvise. You could take a look at the improvised code below, seed taken from Learn Java in a Weekend by Joseph Russell, where I found and used nanoTime by searching through the API index.
C to me appears horrible so far as such indexing are concerned. Java is also fault tolerant and far more flexible than C.
What you wrote was already clear to me, if you look at my posts in this thread.
I wanted to use a Java based OS to ensure myself that Java has all that is required for a programming language. Like Java, even C has to resort to the Assembly Language for the BIOS and bootstrapping.
Anyway, please don't exert yourself here! If possible, look at the other thread at A query regarding the given code and direct me to different ways of writing Object Constructors and a good online Java book that has every aspects covered. I know about the Java Complete Reference 9th edn, by Herbert Schildt but I would wait for some more time for an alternative, as the printed book is a bit expensive to buy.
Improvised code Snippet:
I wanted to use a Java based OS to ensure myself that Java has all that is required for a programming language.
Well, maybe you could explain to us, or at least to me: What requirements?
I myself never heared about any requirement that a "programming language" is required to be able to be used the create an operating system to be qualified as such one and to be allowed to called so.
And to be fair: Most known languages that are called "programming languages" lacks this ability, for example the whole DotNET-family, wich, just like Java, needs its runtime environment to be able to run, and still C# and VB.net are considered fully blown programming languages, just like Java.
Let's better leave this thread. But I was and am polite! Don't be concerned about the issue flaring up on such a simple issue!
Regarding your query, "What requirements?", to me Java appears more intuitive, fault-tolerant and problem-free than C. But C has fulfilled all of my criteria for a programming language, from building an OS to creating user-level packages.
Out of my love arising for the ease of Java I just wanted Java not to be left behind! So I was hoping that there is some OS that is built in Java, but that it was only I who failed to find it.
Which is why I posted this thread!
I would rather request you to move over to my other thread where you would be able to use your abilities better:
Rajiban wrote: ... direct me to different ways of writing Object Constructors and a good online Java book that has every aspects covered. I know about the Java Complete Reference 9th edn, by Herbert Schildt but I would wait for some more time for an alternative, as the printed book is a bit expensive to buy. ...
Rajib Ban wrote:"What requirements?", to me Java appears more intuitive, fault-tolerant and problem-free than C. But C has fulfilled all of my criteria for a programming language, from building an OS to creating user-level packages.
Well, that's one way of looking at it, and it is yours and noone has any rights to question it. It's just an unusual one, that's why my replies don't fit it very well.
About differences: Is easier than C? Maybe. Lack of pointer arithmetics and automated memory management sure makes life easier in one way, but limitations due to more abstractness can make solving a given problem just with Java hard to impracticle.
If we go back when the first ideas about this new platform we know today as Java first came up it was indeed intended to run on special hardware on its own like PDAs and set-top boxes. So at one time there surely was a demand for a special operating system written in a language the chips where designed for (today we call such low stubs for embedded hardware a firmware), but that changed mid-90s.
That's why the Java platform we know today isn't anymore useable for such tasks but rather only server software and business backend logics.
The demand this language fullfills today is different than it was 10 or 20 years ago. First it was designed as something like all those new iot-gadget-toys we have today (it just was its time ahead), then its focus was moved to "teh internets" and nowadays, after its consumer breakdown due to mis-understood security problems in its applet-browser-plugin, its main use is on "teh servers" running boring background batch tasks - or serve as small e-mail-servers/-solution like apache james does on my root system providing me with my own mail-provider-system.
To bring it all down to the hardware level: Modern Java we know today isn't desgined to run natively on x86-based hardware - therefore it's an easy awnser: No, todays Java you can't build an operating system with as it lacks the ability to run natively.
If this is one part of your definition of a programming language the awnser to this would rather be the same: No, following your definition of programming languages, Java probably isn't on cause it lacks the ability to be used for creating an operating system on its own.
As such I can only ask you to understand: No, what you're askin for isn't possible, at least not the way you want it to.
As for your other threads, I didn't had time to look at them yet, maybe I'll take a look at them next weekend if you didn't still got a sufficient awnser, maybe someone else will be faster or more competent.
Matt Wong wrote: ... No, what you're askin for isn't possible, at least not the way you want it to ...
I dropped the wish as soon as I read your post.
You have covered the plus points of C, but you have left aside the difficulties, as I had stated particularly, with its non-existent centrally managed (similar to that of Java by Oracle) Library Indexing and information.
At least, I am able to write meaningful code-bits by myself in Java than I could in C!
Thank you for responding and carrying on this conversation.
Good day, Matt!
I wrote: I dropped the wish as soon as I read your post.
I meant not the latest post, but this one, and here:
on 8/20/2017 at 3:14:53 AM. I may take this up at a future time, if deemed relevant then.
Matt Wong wrote:... Writing a new system-level subsystem would require to write a new toolkit from ground up - so you can't re-use any already existing in Java. ...
Let's leave this thread then! Don't forget to look at the other thread, A query regarding the given code and
As I wrote: ... direct me to different ways of writing Object Constructors and a good online Java book that has every aspects covered. I know about the Java Complete Reference 9th edn, by Herbert Schildt but I would wait for some more time for an alternative, as the printed book is a bit expensive to buy ...
my honest apologies if I had offended you in any way or matter - please believe me I've never meant to. I just layed down a bunch of facts wich sounded a bit rough (as explained: I simply got screwed by my browser and simply wanted some words got posted) and sadly had only negative to say in relation to your initial question and your explainations.
As said, your way of looking at these things is rather unsual, so many more common like replies like mine just may doesn't fit your expactations very well, but please don't feel offended by them.
I replied to this because your question sounded interessting. And we now have come to a point we got an awnser to it. If you already decided that you got a final awnser to your question - that's good news. But there seems no need to kind of forcibly try to guide me to your other threads. If I didn't had replied to them yet maybe there's nothin for me to awnser or I simply have no interrest into the mentioned thread. And to be honest - I'm not feeling sorry about it. It's just another part I don't (want to) participate to or from.
Also, I have to agree with Campbeel Ritchie here: One can write very nice code in C - it only depends on about how good one does know its chosen language and tools.