Has anyone heard of a port of real time Java to MicroC/OS-II?
For that matter, it would be interesting to see if there is a port for Java Embedded 6 to MicroC/OS-II?
Open Java opens up the "general purpose" Java source for other targets, but I don't think the real-time java is in that.
Real time Java
Re: Real time Java
What would you gain by using java?
Re: Real time Java
Flexibility mainly. I've never understood why people marry specific programming languages. Java has first-rate constructs for threading and thread synchronization.
Re: Real time Java
and its slower then hell.
Re: Real time Java
Hello hendrixj,
I program in Java, C and C++ among others. Programming languages are a matter of personal preference. I like C/C++ (very minimal amount of C++) because I have better control over the hardware than with Java, and in my opinion the code is more obvious to someone else because there can be less abstraction with C. Plus my code is running naively, not through a JVM. And yes, I've yet to see a Java based application that impressed me with its speed.
We may have different end goals. On an embedded platform I try to keep things as simple as possible. I see a lot of good posts from you on this forum. Out of curiosity, what additional flexibility do you see with java threads over ucos threads that would make the additional overhead of Java worthwhile?
I program in Java, C and C++ among others. Programming languages are a matter of personal preference. I like C/C++ (very minimal amount of C++) because I have better control over the hardware than with Java, and in my opinion the code is more obvious to someone else because there can be less abstraction with C. Plus my code is running naively, not through a JVM. And yes, I've yet to see a Java based application that impressed me with its speed.
We may have different end goals. On an embedded platform I try to keep things as simple as possible. I see a lot of good posts from you on this forum. Out of curiosity, what additional flexibility do you see with java threads over ucos threads that would make the additional overhead of Java worthwhile?
Re: Real time Java
One man's prize is another man's poison.
Of course the JVM adds overhead. For the record, C adds overhead. You use C because it is more convenient than programming in the assembler code.
If you experiment some with Java you'll see some of the things it does well, and you'll see things it does not do well.
As for threading, Java supplies a Thread class and built in synchronization to coordinate shared data (no more forgetting to unlock). One of the first things I did when I started playing with netburner was to add a Thread class (adapted from something I did with Posix) to make it easy to use. Good abstraction makes code easier to read and maintain, with the typical cost of performance. Your specific project (and experience) determines what balance of goals is right for you.
Real-time Java advertises exceptional predictability. I've never used it, but I'd like to take it for a spin. Ucos already gives good predictability, maybe there's no real advantage. My main interest, if truth were known, that a some real-time Java project may come along, and I'd like to be able to say, "I know how to do that." The thing I fear the most are the icy claws of obsolesence.
There are already a lot of embedded apps built in Java. I imagine some would come in handy in places where netburner boards are convenient. Especially as the embedded CPUs become more powerful, more capabilities will be built in to embedded code. Netburner is already adding lots of web applications: these can be very to implement in Java vs C or C++.
Of course the JVM adds overhead. For the record, C adds overhead. You use C because it is more convenient than programming in the assembler code.
If you experiment some with Java you'll see some of the things it does well, and you'll see things it does not do well.
As for threading, Java supplies a Thread class and built in synchronization to coordinate shared data (no more forgetting to unlock). One of the first things I did when I started playing with netburner was to add a Thread class (adapted from something I did with Posix) to make it easy to use. Good abstraction makes code easier to read and maintain, with the typical cost of performance. Your specific project (and experience) determines what balance of goals is right for you.
Real-time Java advertises exceptional predictability. I've never used it, but I'd like to take it for a spin. Ucos already gives good predictability, maybe there's no real advantage. My main interest, if truth were known, that a some real-time Java project may come along, and I'd like to be able to say, "I know how to do that." The thing I fear the most are the icy claws of obsolesence.
There are already a lot of embedded apps built in Java. I imagine some would come in handy in places where netburner boards are convenient. Especially as the embedded CPUs become more powerful, more capabilities will be built in to embedded code. Netburner is already adding lots of web applications: these can be very to implement in Java vs C or C++.