
| Java and RISC OS |
|
Published: 19th Sep 2007, 06:03:44GMT Source: drobe.co.uk By Nick Brown
|
| Page 1 of 1 |
|
| Nick Brown explores the state of play and future options |
|
Opinion - In 1995 Sun Microsystems announced and released a programming language which would, arguably, become one of the most popular languages shaping modern computing. Initially released as Oak in 1995, the next version in 1997 saw the name changed to Java. Since these early creations almost every platform has become supported with millions of programmers creating millions of programs - all of these are portable regardless of which system Java is running on.
With a very large percentage of higher education institutes now teaching their students Java, whether you love it or hate it, the language is here to stay and forms a major cornerstone of computing as we know it. However, having said all this, there is no up to date version for RISC OS - why?
If a RISC OS user wishes to write and run Java programs there is very limited support available on our platform in terms of third-party rewrites. The first port of call is the Unix Porting Project - with the wealth of software available for Unix, porting an existing system should be a possibility. In order to run a Java program you need supporting software called the Runtime Environment, and one of these in the form of Kaffe has been ported by the UPP. There are also two Java compilers available from the project allowing a RISC OS user to develop programs in the language.
Problem solved? Well not really. Unfortunately due to the huge amount of work required, these ports are not kept up to date, are very much unfinished and only support the first version of Java. The rest of the world is currently up to version 6.
Another Java implementation is Taurus JavaVM, again completely developed by a third-party as the author has written this software from scratch. There are versions for Windows, Linux, MS-DOS and, of course, RISC OS allowing for both the execution and development of Java code. The major advantage of this program is that it supports Java version 4, but the code is not complete and there is no support for networking and desktop applications.
A major disadvantage to this software is the performance - on a RISC PC with a StrongARM processor it takes around 90 seconds to load and run a simple Java program, such as the one pictured. In addition, due to the number of files per directory limit in RISC OS 3.7 and below, the program is really only usable on RISC OS 4, 5 or 6. Saying all that, as the implementation is open source and quite simple, it would probably be relatively easy for a programmer to extend and improve it.
In late 1997 there was an Acorn version of Java which supported version 1. Since Acorn's demise in 1998 there has been no further official development and the software is now difficult to find. When Java was initially released Sun announced on their website that they were to release a RISC OS version. Unfortunately this never materialised and, due to the platform's minority nature, they have decided that the work involved is not worth it.
There is one last twist in the story. In 2006 Sun announced that it would release the implementation of its language as open source, and from November 2006 to May 2007 the blueprints which make up Java have been released. This allows anyone to freely view and modify the core of Java, and has been hailed as a great success by many programmers. The fact that the program code is now available means that if a RISC OS programmer was so inclined, they might be able to port Sun's actual implementation. Unfortunately the amount of work required would probably be extensive, and the performance could be a let down.
Properly supported, Java on RISC OS could open the door to many more diverse programs being made available - addressing the software drought we currently face. Being able to both run all these programs and write our own Java code would, without a doubt, make the platform more attractive to potential users.
Links
Send us news, pix and viewsRelated articles Show your love for RISC OS on Facebook New release of RISC OS Firefox available USB in latest RISC OS 5 source release
This article has been linked to, or is available in the following formats:
|
| |
|
CharlesB (+2.0) 19/9/07 7:20AM |
Graet article and exposition of the facts; thanks. |
jess (+1.0)
 19/9/07 9:05AM |
What is the status of Acorn java? Who owns it? Would it be of any practical use if it were available? (Either as a starting point if sources were available or would any sites still be compatible with it) |
druck (+2.0)
 19/9/07 9:10AM |
Acorn paid a lot to licence Sun's JVM back before there were open source implementations, around the time they also paid a lot for the Shockwave (nee Flash) licence, but the market conditions were deteriorating and they couldn't justify renewing them. Acorn Java 1.0.2 did work rather well, integrating in to both Browse and Fresco and ran all the Java demo applets I tried, at an acceptable speed. Developers also had a preview of an early version of Java 2.0, which although very slow in debug release, showed promise and was able to run the Swing graphical interface with was the flavour of the day back then. |
jess
 19/9/07 9:21AM |
So does that mean that the old version is no longer able to be distributed or just that newer versions weren't licensed? |
druck
 19/9/07 9:27AM |
No licence means no distribution. |
jess (+1.0)
 19/9/07 9:33AM |
So presumably, if sun so wished they could make the existing version available from their website? |
druck (+1.0)
 19/9/07 10:29AM |
Sun can't distribute Acorn's code, even if they had it. There is no chance of resurrecting Acorn Java as far as I can see. Not that there would even be any point in a 1.0.2 or unfinished 2.0 JVM, which wont run any modern Java code. |
rjek (+1.1)
 19/9/07 10:35AM |
These days, Java's use on the desktop, both in applications and web applets, is dwindling. As far as web applets go, it's almost completely dead - Flash won that battle. Where Java is popular now is on servers, rather than clients. I can't remember the last time I needed/wanted to run a Java application on my PC. Come to think of it, I can't remember the last time I saw one. Flash is much more important. |
hubersn (+7.2) 19/9/07 11:13AM |
Since my daytime job is entirely Java-based, I always keep an eye on possible solutions with a potential of getting RISC-OS-ifyed.
The problem of getting Java onto RISC OS is really a three-tier problem:
1) We need a Java Virtual Machine. There are quite a few of them around, and some even have been ported to ARM platforms. SableVM and Kaffe are the obvious candidates. The OpenJDK project talked about porting the Sun Hotspot JVM onto ARM, this would be the best solution, since for client-side code, the Hotspot JVM is generally regarded to be the fastest.
2) We need an implementation of the "native connectors" for the rest of the Java code. Typical areas are AWT, Java2D, Audio, File system, Networking, Printing, process/thread management (intertwined with JVM) etc. - apart from Sun's OpenJDK efforts, there is the GNU Classpath project which aims at a portable solution for different platforms and a complete clean-room reimplementation of the Java API.
3) We need a distribution of the packaged JVM, native code and Java code.
The final problem: an "unofficial" port can't be called "Java" at all, since only Sun can give you a licence to use the name. However, there is currently quite a bit of work done to open up this process (google TCK if you are interested).
So, a minimal solution would be to port SableVM along with the X11 GNU Classpath stuff (with the help of ChoX11) - on other platforms, this is good enough to run Eclipse, so already far beyond an "experimental" state. Then we'll probably find out that everything is horribly slow - for a usable Java environment, I would guess that a lot of work optimizing both the JVM and the graphical libraries would be needed.
Finally, a "proper" solution would require a RISC OS-native AWT implementation, an SWT implementation and a RISC OS Look&Feel for Swing.
To sum it up: it's a lot of work. IMHO - beyond the "minimal solution" which mostly builds on the excellent work done by the GCCSDK developers - much more work than the RISC OS community can realistically do. To get everything into a usable state, it would need a dedicated team and quite a lot of time - think of NetSurf and then add even more.
I'm not sure if it's worth it. Personally, I think this kind of manpower would be more useful if dedicated to projects like NetSurf, GCCSDK/UPP or the Open Source RISC OS. |
hubersn (+2.0) 19/9/07 12:43PM |
Considering the whole IT landscape, I don't agree with Rob at all. In corporate environments, Java is extremely popular on the client side, including applets for rich web-based stuff. Many new clients seem to be using the Eclipse RCP. A lot of clients using J2EE stuff on AppServers are written in Java.
However, this is exactly the market where RISC OS is non-existent. So if we narrow our view down to "Current RISC OS", I agree with Rob. A readily available Java for RISC OS, no matter how good it is, would add very little new functionality for the average RISC OS user. There are a few cool Java applications around (like ProjectX and Eclipse of course), but nothing "essential" for RISC OS users.
Steffen |
hubersn (+2.0) 19/9/07 1:05PM |
BTW, I think the article is a bit confusing regarding the versioning of Java. This is not a surprise, since Java versioning itself is extremely confusing!
Usually, it is best to use the "internal" numbering which is what the JVM itself reports. A quick overview (J2SE only - adding J2EE to the equation makes things incredibly complicated!) including some comments on usage:
1.0.2 - first usable Java - this is what Acorn's Java originally implemented ("Riscafe"). Not used anymore.
1.1.x - this was integrated into Netscape and Internet Explorer and therefore used for a long time in applets. The first implementation of Swing was based on 1.1.x and was distributed as a seperate package. Only seldomly used nowadays.
1.2.x - called "The Java 2 platform" by Sun. Acorn's new Java was planned to be a 1.2.x implementation, but was only nearly finished. Swing is included.
1.3.x - Sun started using the "Hotspot JVM" with this release, a dynamically-recompiling JVM
1.4.x - this is in some way important since 1.4.2 is the first Java where Swing uses "native peers" to draw its elements, to be able to mimik Windows XP Look&Feel. Additionally, assertions were added to the language. This is IMHO still the most-used version and the baseline spec for many targets (later JREs can be used of course to run such 1.4.x compatible software)
1.5.x - now the confusion starts...Sun calls this "Java 5". For the first time, interesting language elements were added like generics, type-safe enumerations and autoboxing. The Sun JVM introduces Class Data Sharing to reduce memory footprint and startup times (two sore points for Java Desktop usage)
1.6.x - consequently called "Java 6". The first version to look sensibly on the Vista Aero GUI |
nijinsky (+1.0) 19/9/07 3:35PM |
In reply to rjek
"These days, Java's use on the desktop, both in applications and web applets, is dwindling".
Not in Biology it isnt. ImageJ which I use daily is probable the mose widespread biology imaging application around. Not the best.. I pay £5-15K for those that render 3D datasets (Amira and Volocity), but for cell tracking, morphology analysis and simple densitometry of westerns etc it is great and free. In addition the speed of startup of RiscOS would be usefull for a scanner machine for blot analysis. I used my RiscPC for this with an epson scanner but then went to ImageJ for analysis back in 1998. An A9 with a CCD camera and ImageJ for analysis would be great in a lab, since we are always short of space in Biology-land.
Cheers
Bob |
tweety (+1.0) 19/9/07 5:09PM |
In the business I work for they use applets for Time Tracking & PDM to name just two. |
rjek (+2.0)
 19/9/07 6:05PM |
In reply to All:
RISC OS uses in business, as Steffen said, is minuscule. Throwing money to bring Java to RISC OS just for these users is insane. Also, most Java apps people might want to use are pretty memory hungry - I certainly wouldn't want to run Eclipse in 512MB of RAM!
There are always going to be niche areas that need Java. I don't think RISC OS's niche overlaps at all.
I stand by my point that Flash is infinitely more important. |
druck (+1.1)
 20/9/07 9:16AM |
For once I'm 100% agreed with rjek. |
hubersn (+1.0) 20/9/07 11:14AM |
Actually, getting Eclipse running would perhaps be the only possibility of getting a proper IDE on RISC OS. And it runs OK-ish with a heap size of 400 MB, so 512 MB would be enough for most uses.
However, I guess most people (including me) just use their PC for development and compilation anyway... |
nijinsky 20/9/07 3:01PM |
Forget about development for a moment. If Java apps like ImageJ ran on an A9 ther are bound to be tons of people that would come into contact with a machine. Then they would say...hey this boots quick. And it is Soooo small, I fancy one of those. Then that is another NEW user.
RiscOS cant be continuously targetted at the existing user or that user base will dwindle.
Chees
Bob |
rjek (+1.0)
 20/9/07 4:19PM |
In reply to nijinsky:
Unfortunately, most Java applications aren't going to run anywhere near as quick on an A9 as a PC costing half the price and only slightly larger. Infact, I imagine most modern Java applications will be painfully slow on either an A9 or an Iyonix. How quickly it boots isn't a problem for most users. |
lproven (+1.0) 23/9/07 10:55AM |
@druck: Shockwave <> Flash. They are related but not the same thing. Shockwave does a lot more than Flash.
In reply to rjek:
I think your comments mainly reflect profound ignorance of the current application market outside RISC OS. It is /very/ widely used and there are big important desktop apps that are based completely or in part on it. OpenOffice, NeoOffice on Mac OS X & the Eclipse IDE are a few; I also regularly use desktop Java apps.
Java would, IMHO, be one of the biggest possible boons to RISC OS there is. |
hubersn (+1.0) 23/9/07 11:09AM |
In reply to lproven:
only very few things in OpenOffice actually need Java (see OpenOffice FAQ), the rest is a big heap of C/C++.
However, the important question remains. How much time and effort would it take to bring it to a usable state? Even on the multi-GHz x86 platform, people describe many Java applications as "sluggish". Now think about a minimal Java port using ChoX11 and remember how the Firefox port "feels" on the fastest RISC OS hardware we have. Now extrapolate and think about Eclipse... |
hzn (+1.0) 23/9/07 11:42AM |
In reply to nijinsky:
I agree with rjek. And as for space just take a laptop which has the screen etc. built in and can even be used offline. And with the odd sleep mode the system can be ready to use pretty quickly. |
rjek (+2.0)
 23/9/07 12:10PM |
In reply to lproven:
I've not seriously used RISC OS in years, I use it as a toy hobby platform. Java is /not/ widely used in applications. OpenOffice's build system depends on it, and a handful of the more rarely-used features do, but in general the runtime does not - and you'd not want to natively build OpenOffice on RISC OS kit anyway - it'd take months. I've already mentioned the Eclipse IDE in this discussion, and suggested that running it along with the build tool chain tools in 512MB is going to be unpleasant - it's not the fastest piece of software on modern PCs. Windows doesn't come with Java by default these days, and most users don't notice. What they would notice missing much more is if Flash wasn't bundled.
Things RISC OS needs to make Java more sensible: An overhaul of the OS, including support for more memory, good solid support for threading, a file system that isn't an embarrassment, and hardware that isn't so slow. Now, I doubt many of those things are going to happen any time soon. Flash doesn't stress the system anywhere near as much, as well as being much more widely used. Without it, web browsing on RISC OS is almost a laughing stock. |
dms 23/9/07 4:57PM |
h |
dms (+1.0) 23/9/07 5:05PM |
Ignore previous comment - I guess the 'Show help' button really should read 'Post message'!
rjek - I think I can safely assume you are not an Electronics Engineer. Java is very much the language of choice these days for electronic design tools such as schematic entry, PCB layout and programmable logic design. Indeed, in many cases, vendors are rewriting existing C/C++/Assembler/whatever applications to be Java-based. |
markee174 (+1.0) 23/9/07 5:14PM |
In reply to rjek:
Java is not 'widely' used in shrink-wrapped 'consumer' applications but is heavily used in an awful lot of B2B application as well as backends to websites. A lot of 'Macromedia's software (ie ColdFusion, parts of Dreamweaver) are actually written in Java.
And a lot of applications are written in Java using the RCP platform ontop of Eclipse.
As just 1 example in 1 industry, look at the number of Newspaper internet sites published using Escenic, which is written in Java.
|
rjek (+1.0)
 23/9/07 6:00PM |
In reply to dms:
I've always used Eagle for small stuff, and Mentor Graphics for complex - both of which are C/C++. (In fact, Mentor's got a bundle of Perl and TCL in there, too) And if you think having access to some ultra-niche electronic design tools that will be unusably slow on any RISC OS box will somehow help the market, I'm not sure what drugs you're on!
In reply to markee174:
B2B? What's that? Same goes for you, though: all counter-examples people have listed here about why Java is important are ultra-niche. Having them available won't help the platform move on or be more generally useful. I certainly don't see Adobe expending effort porting Dreamweaver or ColdFusion to RISC OS. Do you? |
dms 23/9/07 7:16PM |
"I've always used Eagle for small stuff, and Mentor Graphics for complex - both of which are C/C++. (In fact, Mentor's got a bundle of Perl and TCL in there, too)"
I've got news for you. The next generation Mentor ECAD system that is supposed to replace the existing Boardstation and Design View/Expedition flows is claimed (by Mentor) to be 100% Java based. I believe it is scheduled for release in about two years. |
adamr 23/9/07 7:27PM |
In reply to rjek:
"B2B" stands for business-to-business. Of course, the chances of getting one business using RISC OS are pretty slim and the chances of two such businesses needing to interact seem vanishingly small! |
rjek (+1.0)
 23/9/07 7:29PM |
In reply to dms:
I'll stick with Pinnacle, then. In any case. you'd be mad to run such powerful and CPU-hungry CAD software on any RISC OS box, so it doesn't matter either way. Can anybody actually suggest anything written in Java that the average computer user actually wants, and more importantly, knows they want? |
markee174 23/9/07 7:51PM |
In reply to Rjek:
Business to business (ie companies selling to other companies not to consumers). Its actually a major part of the software market along with inhouse internally written software. Software is more than just people buying copies of Word.
Adobe are indeed very unlikely to port Dreamweaver or ColdFusion to RISCOS - they are examples of major applications using Java which you claim does not happen. So you try to switch the argument..... |
| Please log in to post a new comment Use the forum for more comments on this article |
|
|
|