When it was first introduced, Sun Microsystems’ Java software for cellular phones was supposed to let developers write a single program that could run on any handset. A half decade later, Sun’s Java for cell phones, called the mobile information device profile, or MIDP, is used in half the world’s 1.4 billion phones for downloading other bits of software. But writing a program that can run on any handset still isn’t possible.
………because Java is about as platform independent as C is.
…because Java is about as platform independent as C is.
Or from the article :
“Instead, Nokia, Motorola and other handset makers have built devices using their own fixes for MIDP.”
Because they like buzzwords/hype enough to implement java but are so scared of actually competing on a level playing field that they will make sure all the apps/games will run on their platform only.
Write Once, Run Anywhere doesn’t really work on the desktops. What makes you think we need a whole article explaining why it doesn’t work on a cell phone.
Write Once, Test Everywhere is more like it.
I would like to comment on the desktop thing you mentioned. I don’t know about you but my working environment is my XP Laptop, and we deploy this scientific apps to Ubuntu Laptops, which I don’t have to recompile, I just give them the jar file and it executes, same goes for our sparcs here. I can’t comment on J2ME because am still studying it on my spare time.
Finally something anyone has tried on it’s phone is acknowledged…
Wrote once, didn’t run anywhere
IMHO they didn’t take enough care of too limited MIDP resources and extensions. If you want, the product lifecycle was way too long and the process too slow.
Sun, look at how MS has managed to bring DX over a now dying Opengl… It’s multimedia market, not databases
Java 1.5 is nice, I’ll concede that. The problem is, it arrives 5 years too late. Java has been so bloated an inefficient for so long many people simply jumped ship and restricted its use to the app server and middleware stuff. .NET is the next big thing on the desktop, java lost.
.NET is the next big thing on the desktop, java lost.
How can you possible say .NET is the next big thing when it’s one platform only, and a continually shrinking platform at that?
You’re absolutely right, if you flip .Net and Java. Even MS has acknowledged that .Net is failing; afterall, C# did come 5 years after Java, 5 years too late…
Admittedly, I haven’t run much of anything on my phone. I’ve just tried the games, but they were excruciatingly slow both to download and to execute. I gather that java has run once or twice in the few times I’ve ever accessed the web, but that, too, is slow to the point of uselessness. It’s a major barrier against considering cell phones as a viable application platform.
Maybe my phone is just too low-end a model, but the app would have to be pretty compelling before considering a major upgrade.
yup, your phone IS slow
and as for downloading an app, it’s hardly the devices fault.
Some of the earlier models are really crappy, and limits you to use up to 64kB jar sizes (compressed java code), with a maximum memory usage of ~200kB (typical Nokia series 40 specs). And they often also had slowish processors
The problem isn’t that Nokia implement their orn java stuff and motorola theirs.
The *real* problem is that the midp and cldc is implemented with bugs on all devices, for all manufacturers.
This means that despite using ONLY sun’s api, I still have to create 20+ build targets to cope with random errors in the implementation for that device. It’s a major headache, that no one seems to want to fix.
>.NET is the next big thing on the desktop, java lost.
Sure thing…..
.NET = write once, run only on Windows, now thats a step forwards.
i think you forgot about mono.
http://www.mono-project.com/Main_Page
I would have thought Sun would have an extensive test suite to ensure all implementations were on the same page.
stop flaming java please or try to give some arguments!
as I already said before on osnews…
– developing with sun jdk1.4.2 under xp in eclipse
– deploying offline vesion under windows+ jrockit 1.4.2
– servers are quadri and octo pa-risk under hpux, jdk 1.3.1 and jdk1.4.2
– new server are now running under linux sles 9, jrockit 1.4.2
I (we) never have any problems of inconsistency through plattform.
if this is not write once run anywhere (different os, different jdk)!
Do not forget that the jvm support through an abstraction layer the hardware. In a celullar phone, hardware should be a nightmare to fully support, since there is so much model.
And java is NOT slow, all people saying this should profile their code! and review their design: It is possible to write shit code in any language!
I do not know JME apis so i cant comment on it…
Moreover, I have never heard that java is forcing companies to develop with it, but on the other side, the past history has show that there is more anticompetitive practices than really a merited leadership.
cedric
http://www.waltercedric.com
“I (we) never have any problems of inconsistency through plattform.
if this is not write once run anywhere (different os, different jdk)! ”
Nonsense! Nokia, Motorola, $anyone, with Java can build via software their own platform and casting arbitrary constrains that can definitely force the developers to write non portable apps if they want the apps capable to doing something useful!
Java means that you can build platform that can be easily be interoperable on not interoperable, it’s a software choiche, not a long and costly matter of hw enginerization… but see what vendors had done with hardware, introducing “protections” and incompatibility wherever it’s possible, unless the market hadn’t the opportunity to impose a common base (like happened with x86).
On Java the vendors are doing the same thing in a simpler way, they build their software platform to not be interoperable to get their strict hold on the buyers, it’s not a fault of Java, however it’s what has happened, only some kind of application can circumvent this vendor policy and run with good performance and significant features on more than one platform, at least on cell phones platforms.
“And java is NOT slow”
http://shootout.alioth.debian.org/benchmark.php?test=all&lang=gcc&l…
http://shootout.alioth.debian.org/benchmark.php?test=all&lang=gcc&l…
No, Java IS slow as can be shown testing it with comprehensive, well profiled becnchmarks.
“No, Java IS slow as can be shown testing it with comprehensive, well profiled becnchmarks.”
You call that a benchmark?
int main (int argc, char **argv)
{
double i=1, sum=0;
int n;
for(n = atoi(argv[1]); n > 0; n–, i++)
sum += 1/i;
printf(“%.9f
“, sum);
return 0;
}
You are aware of differences in floats in Java and C?
It’s a lot of benchmarks, each of which are microbenchmarks, where several are faulty in that they dont compare apples to apples.
FWIW, ofcourse Java will be slower than a non-gc, non-vm, no-security language – it’s logic.
I could post some stuff that says C is SLOW, because ASM can do it much faster, but that would say more about me, than the actual speed.
Java is not SLOW, it’s slower at many things, but thats not the same thing as saying it craws or similar.
more flawed benchmarks:
This supposedly tests startup time:
#include <stdio.h>
int main() {
fputs(“hello world
“, stdout);
return(0);
}
fputs, should be removed – since it does a lot of work
and comparing startup time for a stripped C app against a stripped VM based app, is hardly fair.
I am fairly sure that the guy that made these benchmarks did not intend for them to be used in a flamewar, but sadly people picked up on it and used it as such :/
quoting myself:
“this multimedia market, not dabatase”
and mobile/embedded multimedia…
ever tried programming for those resource limited toys?
I have been developing a J2ME game for blind people (heavily sound-based), and Sun should revoke Java licenses to Nokia, Sony… Every phone has it’s own implementation and I haven’t found (yet) any cellular that has full MIDP 2.0 and MMAPI support. That ruins J2ME development, and thus, use.
Has anybody ever used a blackberry (OS v4.x)
It crawls, most mobiles crawl while running any java app, and if they do not it’s because they’re using extensions… which by the way you need to support custom hardware.
And we end with the following question… why JAVA on a mobile phone? it doesn’t make any sense, at all.
Oh, I know it’s because people like sony/nokia refuse to pay proper developers, not because of the monetary cost, but because they think that a developer is easy to replace on the Java world than on the C++ world.
People are bitching about lots of stuff, but realize that cell phones today are where minicomputers were in the 80’s. Exploding market, multiple vendors, incredibly short windows for product cycles, etc. OF COURSE THERE ARE BUGS.
Java really is amazing, but cell phones are a whole frontier of technology that it has to adapt to. On the desktop, Java allows me to run the same application on platforms the developers don’t even have. It’ll get there for phones, too, in time.
For those who thing .NET is the best thing since sliced bread, well it speaks volumes about your character to place so much faith in a single-vendor solution. So little of .NET went to the standardization process, and so much of the rest is burdened by patents and copyright, that multiplatform .NET is a myth. Sure, people are trying, but I don’t see how they can afford the teams of lawyers to back them up against Microsoft. With Java you don’t need the lawyers, as long as you follow the license and protect the trademark (Sun’s approach is so much less antagonistic towards developers that it would be insanity to adopt .NET).
“Java really is amazing”
HUH ? Java is just a language like smalltalk .
We need a new fast language that can do graphics. How about D ?
D already exists, actually.
http://www.digitalmars.com/d/index.html
Being a small time computer programmer (I can automate algorithms in C! Whee!) thanks to my astrophysics major, the only real biggy I have seen in D is that you can return multiple variables from functions (No pointers needed for simple stuff! Whee!). There are probably more useful and important changes that people who know the features of C and C++ better will like.
> Exploding market, multiple vendors, incredibly short windows for product cycles
This is the point Java MIDP window was way too large comparing to the short ones of devices. With it falling behind, every producer started to modify it according to it’s uses, Nokia the chief. And I don’t blame them, really…
I personally don’t think .NET will have it’s bread way into consumer electronics. WinCE devices are the target, and they use to be quite poweful compared to mobiles.
Anyway, I don’t consider stuff like Symbian a new frontier at all, it’s a whole system with a lot of work behind it And high-end mobiles run Symbian…
That’s why Windows Mobile will shine! In your face Sun Microsystems!
It’s too slow for graphics.
We know will want phones/pda with graphics that will connect via broadband/wifi .
Java is good for secure servers.
We need a new language thats easy and fast. How about C or C++ ?
Carmack tried his hand at java games. Let’s say he was not amused by the lack of interoperatability.
Not it’s established java on the phone has failed, what will the next big thing be?
Better java, or someone else’s inter-platform product? I can’t imagine this to go on forever.
You think J2ME/MIDP are bad, try BREW.
I’ve developed in J2ME (both MIDP and DOJA) for a couple of years now and when I want the “run anywhere” aspect of Java to succeed I just stay away from the vendor specific libraries. MIDP 2.0 is quite powerful and fills in gaps that vendors had a couple of years ago.
I also found that relying on Form/Panel based interfaces will get you exactly what the browsers on your PC give you. Inconsistent interfaces! Stick to canvas based screens and the look and feel of your app will be solid!
and growing fast! This despite being kinda slow and some annoying incompatibles which hopefully Sun will be able to solve.
Case in point, all next generation DVD players will ship with Java for programming “control menus, interactive features, network services and games”.
http://news.com.com/Java+to+appear+in+next-gen+DVD+players/2100-104…
“The new Blu-ray spec is going to put a Java virtual machine in every new next-generation DVD player, and all your DVDs are going to have Java bytecode on it that gets executed…”
Theres a lot of people here bitching about how much Java sucks yet alternatives like BREW and Trioent(sp?) are losing momentum and will proably be all but dead in the next 5 years. If Java sucks so much why are more people than ever choosing it over all other avaiable solutions?
Java, Sun’s poorly designed language created to increase service revenues, is not a good language for building anything except mediocre server/middleware apps.
Also, as Sun sells hardware, don’t ever expect Java to be anything other than a CPU killer.
If you need to blow the complexity of a project through the roof, choose Java. Make sure you specify “everything must be J2EE”.
On the other hand, if you want to program phones, progam desktops, or build nice low complexity server apps, there are numerous alternatives that will save you time, money, and sanity.
i cannot believe how ignorant people be about technology, especially Java. Apple did not ditched Java at all. They have recently unveiled Java 5 for Mac OS-X and it is completey designed by Apple. They just do not support Cocoa spesific bindings, which almost nobody uses anyway. Java is very good in server side, and is getting much better in desktop, stop the FUD.
actually java 5 for mac os x still isn’t out yet. it’s beta for developers
Developing multi-vendor multi-handset applications for mobile phones is not that easy. It is impossible to make a platform that pleases all the phones and companies out there. But J2ME is doing a good job on very easy to port application developement, if not seamless. You cannot do the same with C++, or any other language in that arena. the closest thing to j2me is Brew, but it is not as widely used as J2ME.
The Current use of Java on Cell Phones is very different than on desktops. You mainly see Java being used for a simple interface. The Savior for Java is when you see a combination of PDA and Cell Phone (like the Treo) where you have the horsepower and the screensize to utilize the apps.
> Java 1.5 is nice, I’ll concede that. The problem is, it arrives 5 years too late. Java has been so bloated an inefficient for so long many people simply jumped ship and restricted its use to the app server and middleware stuff. .NET is the next big thing on the desktop, java lost.
Ha, it would help if .NET was any less bloated and ran any faster than Java. Java 1.5 apps of similar size and architecture actually run faster than .NET probably because Java runtime is currently more advanced and does a better job with lazy class loading and garbage collection. Remember that .NET is just a bad ripoff of Java with the same shortcoming of a language running under VM, so expecting that .NET is somehow dtrastically better than Java is just unreasonable.
> D already exists, actually.
Hey there Anon. I was a BS Physics myself.
I took a quick peek at D. I was disappointed that the designer/implementor of D seems to want to keep his compiler backend to himself (supposedly for Digital Mars to make some money with, I guess).
If he GPL’d his compiler, I think D would take off like a rocket. Unfortunately, it doesn’t look like he will, and D will very likely continue orbiting low, just near the event horizon.
It doesn’t look like there’s an active GNU implementation of D — possibly because Java is just a really nice language and GCJ is coming along so well.
I wrote:
> possibly because Java is just a really nice language
Well, nice enough for now anyway.
Heh. If Digitalmars opened up their compiler, maybe you’d soon see an alternative OS written in D…
“If you need to blow the complexity of a project through the roof, choose Java. Make sure you specify “everything must be J2EE”.”
Whatever. If you were on projects like this (everything J2EE), then you had some seriously bad management and architects as co-workers.
When Java is applied in the right amount (e.g., not enterprise beans for twinky-dink websites), it is a very good platform.
Oh, BTW, I happily run Java apps on a 300MHz PC. Java 1.5 has made a big difference, and C/C++ GNOME apps are not one bit better, performance-wise. If you want to see how wonderful C/C++ can be on big projects, just look to GNOME and OO.org…
Heya,
I was wondering. Suppose that a lot of applications, that are compiled (further) on the device, are used on systems that use battery-power. Wouldn’t the compile reduce the battery-life more? I wonder how much the battery-life is reduced, compared with code that is already fully compiled.
greetings,
Michel Brabants
The page you pointed for benchmarks is ridiculous. i have already made a fight with those guys about their techniques. Check the “fasta algorithm”
http://shootout.alioth.debian.org/benchmark.php?test=fasta&lang=all…
before, Java was 150seconds (now they changed it to “ERROR” without explanation, hiding their shame). then with a simple tweak it go down to 2.7 seconds.
Those guys are if not deliberately targetting Java, they are making mistake by:
– adding JVM startup time to the algorithm timing.
– not using the latest java
– Not preparing “real” bencmarks but a bunch of silly routines
– They do not apply interntionalization rules in text algorithms where C-C++ would definitely suck.
– they think they mesure the memory consumption but they actually do not know about java memory metrics.
– most algorithms are nicely tweaked for some “other” languages but Java ones are ocasionally crappy or missing.
i always said will say, Micro Benchmarking not only does not make sense, but also the most abused subject especially in the hands of zealots and big companies. thus, not to be trusted in anyways.
But, the fact is, results are still quite good for Java if you want to take it serious. Anyway, dont come with that page as an evidence that Java is slow. it is fast enough for many applications. it does maybe not perfect but ver good job providing a cross platform application developement. And subject here is J2ME, not J2SE. it is a different market.
Oh, BTW, I happily run Java apps on a 300MHz PC. Java 1.5 has made a big difference, and C/C++ GNOME apps are not one bit better, performance-wise.
Right. Performance-wise.
Of course, these apps will take a bit longer to start up, and they will consume more memory.
Also worth considering is that the Java apps will likely get *written* (i.e. developed) more quickly, and have fewer bugs than their C and C++ counterparts.
Java is slow, get over it.
Hmmm… no answer. Do I infer therefore that there are no usable Java applications for phones? It may be more fun to trash Java and praise …whatever… or trash …whatever… and praise Java, but I’d like to know if there’s anything compelling enough to even want java on my phone. This is not (or at least intentionally) a troll, I’d really like to know.
I’m reading nonsense arguments left and right here by people that obviously don’t know much about Java or don’t like it for their own subjective reasons.
Java might not be perfect, but compared to developing for these same platforms using C/C++, it is heaven! The same goes for desktop developers. All these whiners bitch about “run anywhere” not being 100%… Fine, ok… so it’s not 100%, but it is still 100x better than what you get with C/C++.
And take it from someone who’s actually had to develop software for the embedded market in C, the fault lies mostly with the platform providers, not Sun. For god’s sake, these idiots couldn’t even provide a decent C compiler for their platforms (tons of bugs!).
Anyway. Give Sun some credits. They did an incredible job in a crippled domain!
Gili