Five Years On, Has J2ME's Time Finally Arrived? 93
jg21 writes "Although he admits to having been frustrated by the slow adoption of the J2ME platform, software developer Eric Giguere believes that we're 'turning the corner.' He remembers Sun demonstrating Java running on Palm OS 'way back in 1999 when so many hoped the wireless Java revolution was just around the corner. Five years on, with notable successes such as the J2ME-enabled BlackBerry wireless handheld, that has already made a billionaire of RIM founder Mike Lazaridis, Giguere claims that, with most of the new handsets being produced supporting either JTWI or else its key component - version 2 of the Mobile Information Device Profile (MIDP) - developers finally now have a more consistent and capable platform to use for application development. Anyone wandering round this week's CES may be inclined to agree."
Java Orphans? (Score:4, Interesting)
Not to be a troll, but what is it with all these intriguing Java products, free for downloading, that don't go too far?
Re:Java Orphans? (Score:2, Insightful)
Re:Java Orphans? (Score:1, Troll)
On top of that, Java is very verbose. Type declarations, wrapping everything in classes, casts, mandatory exception handlers, etc. all stand in the way of rapid development.
The vanilla runtime environment is a huge download, and the development environment is even worse. The VM takes up a lot of memory, and the
Re:Java Orphans? (Score:1)
I agree that java is somewhat inflexible, but macros? come on! The whole point of eliminating macros is to eliminate confusion and reduce complexity.
"The vanilla runtime environment is a huge download, and the development environment is even worse. The VM takes up a lot of memory, and the startup time basical
Re:Java Orphans? (Score:2)
``AFAIK you can't do a read-eval-print loop in Ruby either, but somehow it is more elegant? (feel free to prove me wrong)''
It's called irb.
``Not sure what the beef with the container classes is''
I meant that, if you wanted to iterate over a sequence of, say, Person objects, you would do:
Re:Java Orphans? (Score:2)
Actually it was even messier than that since you had to put the code to get the next element inside the loop and not as the "next" clause. All in all, it was a common piece of code that was easy to make stupid mistakes in, and so the new for syntax is a great improvement, allowing Java programmers to take advantage of iteration over collection types in a way similar to
Re:Java Orphans? (Score:2)
Re:Java Orphans? (Score:1, Troll)
Remember, Java is an excellent language to use on your project, because it allows a PHB to hire hundreds of cheap, poor programmers, as a commodity. Java's structure reduces the difference between how different people/teams write code, so that new developers can be integrated into a development team faster, spending less time learning the ropes of a particular project.
Java is a good tool to allow poor programmers to write reasonable code.
Re:Java Orphans? (Score:2)
Re:Java Orphans? (Score:1)
Re:Java Orphans? (Score:3, Insightful)
Java2D got integrated as anyone who uses swing will want it. I think jini is included, but i'm not sure. Java mail, i'm sure will be in a j2ee implementation soon enough.
Instead of flat out bloating the API by adding stuff, ala php, they incubate it out in the wild.
Java mail is well used (Score:2)
Granted, it's not the easiest API in the world and I greatly simplified all that complexity into:
Email email = new Email();
email.setRecipients(String[] recipients);
email.setSender(String sender);
email.setSubject(String subject)
email.setBody(String body)
and finally...
boolean success = email.send();
But the code implementing this is quite a bit more, required a long time debugging the mail relay issue (required authentication!), and othe
Re:Java Orphans? (Score:2)
As for the rest.. The strategy is perfectly clear. Sun makes a bunch of java add-ons in the com.sun.* heirarchy and releases them. If they catch on, they eventually get integrated into Standard Edition.
Swing, Sound and ImageIO for instance.
Anyone? Anyone? (Score:1, Insightful)
Re:Anyone? Anyone? (Score:2, Funny)
Re:Slashbot Mods : On Crack or Freebase? (Score:2)
And you have never heard of irony. Anyway, it seemed somewhat apropriate for this place.
Re:I GUESS SO (Score:1)
I also seem to recall that one application being distributed on 100+ million devices still only equals a single application, not 100+ million applications (must be that new math that I keep hearing about).
Funnier still that Java is still an interpreted language and that language bigots like yourself look down your nose at any other language that threatens y
Re:I GUESS SO (Score:2)
Not for a long time. Almost all Java implementations translate to optimised machine code at run time.
Re:I GUESS SO (Score:1)
Oh, so then I don't need to invoke the JVM with:
java
Still looks like semi-interpreted code to me, just cuts out part of the parsing/translation work. Try again.
Re:I GUESS SO (Score:2)
Oh, so then I don't need to invoke the JVM with:
java
Why is this relevant? You do understand the phrase 'at RUN time'?
Still looks like semi-interpreted code to me, just cuts out part of the parsing/translation work. Try again.
You try again. You did not say 'semi-interpreted' (whatever that means), you said 'interpreted'.
Java translation to (very optimised) machine code on almost
Re:I GUESS SO (Score:1)
I have yet to be associated with a project written in Java where we didn't have to rewrite in another language (C or C++, usually) to fulfill the system requirements (those projects range from embedded systems to large enterprise systems).
I'm happy for you (and all the reat) that Java does what you need.
Re:I GUESS SO (Score:2)
I used to code a huge amount in C/C++, and was a serious Java sceptic years ago, because of the hugeness of the run-time and the terrible speed (I once saw a demonstration of Swing, and could not believe how anyone could use something so slow). However, that was years a
Re:I GUESS SO (Score:2)
Depends where you look. What I see is Java and C/C++ about equal, C#/.Net far behind (about half the demand) and PHP hardly registering. This is in the UK, where
I also seem to recall that one application being distributed on 100+ million devices still only equals a single application, not 100+ million applications (must be tha
Re:I GUESS SO (Score:1)
Hmm, I'll put hard money on the table that there aren't "millions" of Java games. How about you?
Licensing fees? What licensing fees? Use any free VM and an open source J2EE server like JBoss and there are no fees at all.
Hmm, from your comment you must not work on really large enterprise systems. JBoss is great for small-to-medium sized systems, but I'm betting there's a reason that WebLogic is at the top of th
Re:I GUESS SO (Score:2)
I would agree, but that was not what you were arguing, was it? You were implying that millions of downloads had no connection with the number of different applications. If you had actually researched the market, you would know that there are thousands of applications.
Hmm, from your comment you must not work on really large enterprise systems. JBoss is great for small-to-medium sized systems, but I'm betting
Re:I GUESS SO (Score:1)
I would agree, but that was not what you were arguing, was it? You were implying that millions of downloads had no connection with the number of different applications. If you had actually researched the market, you would know that there are thousands of applications.
No, my comment was meant to point out that millions of downloads (of anything) doesn't equate to millions of applications. Ergo sum, I remain uni
Re:I GUESS SO (Score:2)
In your original comment you said that 'Java brings nothing to my table except addit
Re:Anyone? Anyone? (Score:1)
But the real question is why do the cell phone manufacturers write most of their apps in C++?
Re:Anyone? Anyone? - Shoulda used the Preview (Score:1)
Re:Anyone? Anyone? (Score:2)
Re:Anyone? Anyone? (Score:1)
Wow, a Troll AND an ipod sign, all in one post! (Score:2)
Re:I still don't see the point... (Score:3, Insightful)
since there are about several hundred devices out there, what exactly are you going to program in if you want to target a braod enough audience?
i can't believe programmers are so ignorant about mobile development! there's more than just the server you know...
Re:I still don't see the point... (Score:4, Interesting)
Re:I still don't see the point... (Score:3, Insightful)
The language does a pretty good job of allowing you to write one ap to all these, but what ap could you write?
Re:I still don't see the point... (Score:2)
I never understood why an interpreted language was a good idea for slow mobile devices. Do any J2ME JVMs do JIT compilation?
And J2ME JVMs are so broken and incompatible that JAMDAT has support something like 70 different builds of the "same" game to support different JVMs!
Re:I still don't see the point... (Score:2)
...slow adoption????? (Score:3, Informative)
open any teenager magazine(at least in europe) and half the adverts are for j2me games(and ringtones.. sigh.).
and practically all phones are coming with j2me now...
Re:...slow adoption????? (Score:1)
Ho Hum. (Score:2)
J2ME is worthless (Score:2)
Sorry, but running code in a Sandbox (separated from the DATA) makes it pretty much worth a pinch o' bat guano.
The alternative, of course, is Active X, but that's like sharing dirty needles.
There needs to be a happy medium where it is easy (i.e., happens automatically) to have the program get access to the OS's API, but some things are protected. Whoever can figure that one out will win a prize.
Re:J2ME is worthless (Score:1, Informative)
Re:J2ME is worthless (Score:1)
Re:J2ME is worthless (Score:1)
ceo
www.j2medeveloper.com
Re:J2ME is worthless (Score:3, Funny)
Re:J2ME is worthless (Score:2)
Can you present some case to your proposition or are you expecting that people take it axiomatically? I wonder why a perfectly good method for code security is not good. And for old ActiveX, Microsoft is doing pretty much the same as Java in
Re:J2ME is worthless (Score:4, Interesting)
That said, if sandboxing is a problem there is always personal profile if you are working on PDAs. It is pretty much just a slimmed down J2SE with pretty much all the access to the hardware you'd need, with AWT, which may not be your favorite toolkit, but is sufficient for PDA work. IBM's Websphere has SWT on PocketPC, which is clean and nice.
Even sandboxed, there are lots of useful applications that could be written other than the more or less pathetic games that seem to dominate this space.
I see two main issues with J2ME as a whole. The first issue is that performance is so limited. The ones I've used are OK once JIT has had a chance to do its magic, but getting the application off the dime on startup can be pretty painful. A lot of applications for mobile development require responsiveness. The Pizza delivery guy is going to freak if his delivery tracking program takes twenty seconds to launch while he's sitting on the doorstep.
You could locate a lot of your business logic off the phone, but in that case you might as well consider going browser based.
The second issue is that not many people have experience developing for such a constrained user interface. You just can't try to shrink down the same old things you do on a VGA resolution monitor to a PDA or worse yet a phone. There's a shift in style you have to make that takes some practice.
Actually, trying to do some non-trivial stuff on a PDA is good design exercise, and changes the way you look at other kinds of user interfaces.
Re:J2ME is worthless (Score:2)
so, basically, someone already won your prize. the phones offer some access to os api, leaving some inaccessible.
and i don't really get why you couldn't have data _in_ the sandbox.
but you don't really sound like you got a fucking clue about what you're talking since you've thrown in activex too, which is not really in use anywhere in the millions and millions of j2me
Here's a working link (Score:3, Informative)
Here's the actual working link [javadevelo...ournal.com] to my guest editorial.
EricRe:Here's a working link (Score:1, Funny)
You're a respected Java developer...do you actually think you'll get good discussion from a site populated by script kiddies who think PHP is the answer to everything? C'mon, when you see people comparing J2ME to ActiveX, or mistaking J2ME for J2EE, you really are in the wrong place...
Slashdot makes javalobby look like a respectable forum!
Re:Here's a working link (Score:2)
I had nothing to do with the original Slashdot story... someone else submitted that. I'm just clarifying the link.
The comments can be funny, though, like the kerfuffle that was caused earlier today by my use of "kerfuffle" in the story I did submit [slashdot.org].
Eric
View your HTTP headers here [ericgiguere.com]
Re:It's dead Jim (Score:2)
You mean JavaScript right?
Why it won't gain ground (Score:3, Interesting)
Although for the most part J2ME is meant to be as portable for as many devices as possible, it would've been nice to provide facilities to manipulate common PDA features such as: address book, calendar and todo list. I was surprised I couldn't even touch those when I was doing MIDP development before.
J2ME is more about connectivity to remote systems which may be good for business applications, its also very expensive to deploy because of the costs of cell phone air time. Still its not too bad.
With J2ME and all the drawing facilities, another common application type you can build with this are games. I've seen a few java based games and they're not too too bad.
I think it would gain ground if Symbian releases a library that provides direct access to its core facilities such as changing the screen saver, the background images, and replacing the application menu. Mind you there are applications that do these already, though you have to pay for it for something so simple, although setting up the C development environment for Symbian is difficult too.
Re:Why it won't gain ground (Score:1)
This is why MIDP2.0 is a good thing, which was the point of the article. Did you RTFA?
Seriously though, this is also a benefit as well as a drawback. If java had an all-encompassing API, it would likely be too big for a lot of handsets, cost too much to implement, and therefore fail as a l
Re:Why it won't gain ground (Score:2)
As far as security implications, we already have code signing to check for trusted sources.
As for the title, I still think it won't gain ground unless Symbian provides APIs to take advantage of the phone's capabilities, combined with Sun providing a Service Provider Interface with some common
Re:Why it won't gain ground (Score:2)
Well... Those are exactly the kind of things I do not want a random application to touch. If there is good reason why a 3rd party application should get to set my phone wallpaper, I'd like to hear it. I'm not picking a fight here, I'd really like to know if you have a reason for a move that (in my book)
Re:Why it won't gain ground (Score:2)
If that's the way of the future, Sun wouldn't have developed Java Web Start to provide full access to the machine as long as it asks permission first.
J2ME? (Score:1)
J2ME MIDP 2.0 was better in terms of features, but little else.
If J2ME MIDP is so wonderful, why do the cellphone manufacturers write their applications in C++ (especially for the Symbian OS)? Perhaps it's because they know those dirty little secrets?
Put down the SUN cup with MicroJava and get into rehab.
Re:J2ME? (Score:1)
Re:J2ME? (Score:2, Interesting)
With respect, I don't think it was the MIDP1.0 that fragmented the market (after all, it was a specification) - just the fact that the different handset manufacturers implementations of MIDP1.0 were different is what produced dissimilar results.
If anything, MIDP1.0 united the market (nowadays, nearly all handsets come with a MIDP implementation) because it had a broad enough scope and was small en
Re:J2ME? (Score:1)
With respect, I don't think it was the MIDP1.0 that fragmented the market (after all, it was a specification) - just the fact that the different handset manufacturers implementations of MIDP1.0 were different is what produced dissimilar results.
Beg to differ, MIDP 1.0 had so many holes that device manufacturers were "free" to fill in the gaps for their devices in any way that they could to make it wo
Who Cares?? (Score:1)
Re:Who Cares?? (Score:2)
A lot of people thought that 5 years ago, but it has yet to happen.
EricWhy is William Shatner on my All-Bran? [ericgiguere.com]
major problem: emulator consistency (Score:2)
I've been running into this really frustrating problem of code running flawlessly on emulators, why they refuse to even start on actual devices (I only tested it with Nokia devices sofar). You click on the application, and nothing happens. You just remain in the application selection menu.
the culprit is always a certain part of the code. If I comment it out, it runs fine on the device as well. But that's what makes it so weird: a
Re:major problem: emulator consistency (Score:2)
I really can't imagine how one could do any serious development if the emulator on one's development machine isn't 100% compatible (or at least as close to 100% compatible as possible) to the real thing.
Trust me, this is not an uncommon situation in mobile/handheld programming -- it's not unique to J2ME. Hard to say what exactly is the cause of your problem without seeing any code. What does the code look like?
Eric
Eric's J2ME Pages [ericgiguere.com]
Re:major problem: emulator consistency (Score:2)
I wrote a function (part of a MIDlet) that parses an XML file using the KXML2 library.
In a separate MIDlet, I had tested this code with a simple form, showing the output. That worked, both on the emulator and on my device (my trusty Nokia 6600).
Then I tried to use this code in my main MIDlet. I tried launching this function from a thread, which itself would be launched from within a C
Re:major problem: emulator consistency (Score:2)
When a J2ME application won't even start, it usually indicates some kind of verification error. This will often happen if a required class is missing. Are you included all the kXML2 class files in your MIDlet suite? Don't forget that you need the pull parser classes as well. I always just put the source for these right into my projects, they're so small it's the simplest solution.
EricRe:major problem: emulator consistency (Score:2)
But the Bouncy Castle classes don't give any problems until I use any code that employs KXML2.
I assume that the reason why it only goes wrong why I actually include the function call is because the obfuscator removes the entire XML parser code when it sees that the function is never called.
However, midp_classes.zip continues to stop de MIDlet from running, regardless we
Re:major problem: emulator consistency (Score:2)
I've had problems with Bouncy Castle, yes, and again it was simpler to extract the classes I needed from the Bouncy Castle library and include them directly. I'd do that. I don't remember what it was exactly, but it was easier to just package what I needed directly with the app.
For those who are confused: Bouncy Castle [bouncycastle.org] refers to an open source Java cryptography library developed by the Legion of the Bouncy Castle. (Dumb name, but good code. Better than the reverse!)
Eric
Re:major problem: emulator consistency (Score:2)
At least I can continue working on my project now. The encryption part would have been of later concern anyway.
I have one different question for you, though:
If I have to retrieve data from several url's (PNG images, XML data, etc), then how could I implement that in such a way that the user will only have to click through a single "okay to access the internet?" confirmation dialog, ins
Re:major problem: emulator consistency (Score:2)
Hmmm... I assume the classes are sufficiently independent from one another? In that case, there might indeed be hope yet.
I was able to extract the encryption classes I needed. See my tech tip Data Encryption for J2ME Profiles [sun.com] for details.
how could I implement that in such a way that the user will only have to click through a single "okay to access the internet?" confirmation dialog
This depends on the device, but in general with MIDP 2.0 you can use the permissions mechanism to basically have the u