This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Native methods .. with Symbian ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Native methods .. with Symbian ?" Watch "Native methods .. with Symbian ?" New topic
Author

Native methods .. with Symbian ?

Jim Crawford
Ranch Hand

Joined: Sep 08, 2002
Posts: 127
Hi
Part two of my question being a different topic, actually (that's why I seperated it). Is there any native method support in J2ME? I know about Symbian and the like, but I'm not sure what a 'mobile phone type' OS would limit you to, and in turn, what J2ME would allow if the OS would - in terms of native methods in this case.
Thanks.


<img src="cool.gif" border="0"> <img src="graemlins/beerchug.gif" border="0" alt="[beerchug]" /> <br />SCJP 1.4
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Excellent question! If you are using a MIDP Symbian phone (e.g., Nokia Series 60 and 90), native methods access is not permitted. You are stuck with whatever Java API available on the device. If you are using a Personal Profile Symbian device (e.g., Nokia Series 80 and SE P900), you can call native methods if you recompile your C++ header files etc.
All in all, I personally think we need to provide an easy way to access native APIs from J2ME applications. But many device manufacturers are not willing to do this for a range of security and political reasons. I wrote about this in my blog. Check out:
Functionality first, compatibility second


Seam Framework: http://www.amazon.com/exec/obidos/ASIN/0137129394/mobileenterpr-20/
Ringful: http://www.ringful.com/
Jim Crawford
Ranch Hand

Joined: Sep 08, 2002
Posts: 127
I expect it might have something to do with the phone stability as well. Its unfortunate that phones are starting to be plagued with OS or application stability related issues.
The more complex the device gets the more it becomes like a PC and... yes I have noticed some weird cases where I had to reboot my phone. Sad. Anyway, I suppose limiting functionality to the J2ME API would help a lot to create stable apps, but then the API has to grow fast enough to enable developers for what they have to do. Somehow I think it might be a problem since this particular technology market is moving so fast.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Jim Crawford:
The more complex the device gets the more it becomes like a PC and... yes I have noticed some weird cases where I had to reboot my phone.

To reboot the phone? I just knew that there is some phones, which need rebooting... Yeah, as u said, rebooting phone must be really a wierd case... I also think that in the future, there will be many phones acting like PCs coming up in the market...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
serge masse
Ranch Hand

Joined: Jul 23, 2003
Posts: 102
Michael Yuan wrote:

All in all, I personally think we need to provide an easy way to access native APIs from J2ME applications.

I agree with you but not directly, it must be done via Java normalized API, such as MIDP, the best way to ensure security and consistency (portability). And I am quite sure that device manufacturers would agree with this.


serge - http://goo.gl/GgF7R - my android apps
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by serge masse:
I agree with you but not directly, it must be done via Java normalized API, such as MIDP, the best way to ensure security and consistency (portability). And I am quite sure that device manufacturers would agree with this.

I guess Mr.Yuan is talking about some kinda special JNI for the mobile devices in this context...
It's more conveniently, if we can directly use native code from MIDP... It's just my opinion... I'm not sure whether it will become as we expect...
Michael Yuan
author
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
Originally posted by serge masse:
I agree with you but not directly, it must be done via Java normalized API, such as MIDP, the best way to ensure security and consistency (portability). And I am quite sure that device manufacturers would agree with this.

Yes, but the JCP process is moving very slowly and manufacturers like Motorola are adding proprietary APIs all the time to respond to customer needs -- the platform is already fragmented. I think allowing native methods would at least enable third party vendors to come up with new Java APIs on PPC/Palm/Symbian devices. Today, Java is definitely second class citizen on those devices because the APIs coming out of the JCP is too little, too late.
As of stability and security, J2ME apps using native APIs would be no worse than native apps. We use native apps on our smartphone/PDA combo devices all the time.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Michael Yuan:

Yes, but the JCP process is moving very slowly and manufacturers like Motorola are adding proprietary APIs all the time to respond to customer needs
Today, Java is definitely second class citizen on those devices because the APIs coming out of the JCP is too little, too late.

I guess JCP is emphasizing more on J2EE than J2ME because J2EE has more chances to beat the competitors' technologies than J2ME to beat others... But I also hope that JCP will turn back to J2ME soon, when J2EE got enough market share in the industry...
But in the meantime, I guess "Enterprise J2ME" is the gateway to enter both Enterprise and J2ME fields... BTW, Mr.Yuan, how is ur feeling on the fact that JCP's late process on J2ME? :roll:
Thank you very much...
Jim Crawford
Ranch Hand

Joined: Sep 08, 2002
Posts: 127
Originally posted by Ko Ko Naing:

I guess JCP is emphasizing more on J2EE than J2ME because J2EE has more chances to beat the competitors' technologies than J2ME to beat others...

??
J2ME is big. Very big. Its market share is similarly BIG.
To neglect the specification process for it would be a big mistake.
The 'competitors' should just leave it rather - (No reference to Redmond - )
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Jim Crawford:

J2ME is big. Very big. Its market share is similarly BIG.

Oops... :roll: I guess I didn't say that J2ME is small...
I can see that J2ME got a big market share in Asia, especially in mobile phones...
But anyway, I believe that J2EE already got a strong position in Enterprise Systems, but it has a big competitor, .Net, as well...
Jim Crawford
Ranch Hand

Joined: Sep 08, 2002
Posts: 127
Originally posted by Ko Ko Naing:

Oops... :roll: I guess I didn't say that J2ME is small...
I can see that J2ME got a big market share in Asia, especially in mobile phones...

No worries. Wasn't being that serious.
Around here we only see Java on phones. PDAs - don't know.
May the best technology win!
[ January 22, 2004: Message edited by: Jim Crawford ]
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Jim Crawford:

May the best technology win!

Wish it is J2ME... I am sure that no one can judge which is the best and there will be no perfect technology in the world... There should be some kinda competition... Otherwise, we have to worry about the monopoly for sure...
Just my opinion...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Native methods .. with Symbian ?
 
Similar Threads
new comer
do u know what is this
How windows CE , Symbian compared with J2ME ?
How to begin
Nokia OS Vs Symbian OS