• Post Reply Bookmark Topic Watch Topic
  • New Topic

A JavaOS or JVM running from Linux Runlevel 3?  RSS feed

 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did a thorough search, spanning JavaOS in Wikipedia and StackOverflow, jOS in sourceforge and also JVM that could run from Linux Runlevel 3 with its own GUI components, and not wait for LXDE, Gnome or KDE GUI.
It appears that a JVM running from Init 3 with its own GUI is a very good solution.
Any inputs please?
 
Campbell Ritchie
Marshal
Posts: 56593
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried it? I presume you get access to a terminal at run level 3, so you shou‍ld be able to run the java tool. Please explain how you are going to see a GUI if there is no desktop environment running? Surely any GUI components will throw headless exceptions?
 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dr. Richie,
I meant I need one with its own GUI making components with GDE, LXDE or KDE.
 
Campbell Ritchie
Marshal
Posts: 56593
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure I understand what that means. If GDE, LXDE or KDE are not running, how can they provide components?
 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, a correction:
with GDE, LXDE or KDE.
will be "without GDE, LXDE or KDE." Apologise for the inadvertent error.

I meant a JVM with its own Desktop Environment to provide components as well. Like the JavaOS was to provide for GUI components.
 
Campbell Ritchie
Marshal
Posts: 56593
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a different OS with its own desktop, how can that be run level 3?
 
Matt Wong
Greenhorn
Posts: 23
3
MS IE Notepad Suse
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Rajib,

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.

Matt
 
Campbell Ritchie
Marshal
Posts: 56593
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch and that's useful information.
 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Matt for mentioning the obvious!
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!
 
Campbell Ritchie
Marshal
Posts: 56593
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody did give you the right information (Thank you again, MW). That information is that ncurses might work, but probably won't. I don't know how long it would take to write a framework which does what you are asking about, but maybe nobody else has ever wanted a Java® GUI at run level 3.
Java® was never intended to be an operating system language; some other languages were, particularly C.
 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote: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.
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!
 
Matt Wong
Greenhorn
Posts: 23
3
MS IE Notepad Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
screw it - I've re-written this at least ten times now - at last try looked good - but my browser screwed me - so here's the short version:

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.
 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt, thanks for clarifying the problem so definitively. I've given you a cow for your efforts.
 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt Wong wrote:... 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.
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:
 
Matt Wong
Greenhorn
Posts: 23
3
MS IE Notepad Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To keep it polite and stay focused on the topic:
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.
 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt,
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.  ... 
 
Matt Wong
Greenhorn
Posts: 23
3
MS IE Notepad Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


so long

Matt
 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Rajib Ban
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be precise,
I wrote: I dropped the wish as soon as I read your post.

I meant not the latest post, but this one, and here:
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. ...
on 8/20/2017 at 3:14:53 AM. I may take this up at a future time, if deemed relevant then.

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  ... 
 
Campbell Ritchie
Marshal
Posts: 56593
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest that it is possible to write good code in C, just as it is in Java® or Python or Scala or C#. But C uses a different programming paradigm which needs to be learnt separately.
 
Matt Wong
Greenhorn
Posts: 23
3
MS IE Notepad Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Rajib,

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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!