• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New comer to J2ME

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am new comer to J2ME,
have several questions to who already expert on it.
1. Can I create application to save something to the cell/device and read it later on ?
2. Do we have to care about the type of device ?
like the resolution and etc. Since Java should be write once run anywhere.
Thanks for the info
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1. Can I create application to save something to the cell/device and read it later on ?


Yes you can. Although I think you have to use the same application (called MIDlet) to access that persistent memory space you saved the "thing" into. Can anyone confirm/correct this?

2. Do we have to care about the type of device ? like the resolution and etc. Since Java should be write once run anywhere.


The code is WORA but the UI is not guaranteed to stay usable... In practice you may need to worry about available memory, CPU power, available persistent memory, network connectivity features, screen size, and the list goes on.
 
Gus Mus
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the answers... Now I am going into it (J2ME)
Any of you have recommendation which device is the best to program J2ME ?
(I mean by using this device then worries about things like memory,CPU power, resolution, etc can be reduced)
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:

Yes you can. Although I think you have to use the same application (called MIDlet) to access that persistent memory space you saved the "thing" into. Can anyone confirm/correct this?


My understanding was that as long as its not any sensitive device-dependant data, it could be accessed from another MIDlet. I remember reading about the security that prevents a MIDlet from accessing certain files, but I thought a regular text-based file was accessible...
Can anyone confirm this for us?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Any of you have recommendation which device is the best to program J2ME ?
(I mean by using this device then worries about things like memory,CPU power, resolution, etc can be reduced)


I'd say Nokia 3650/7650 or Sony-Ericsson P800 (see this benchmark). They have relatively large screens and a lot of memory/processing power.
Check out javaperformancetuning.com for J2ME performance tuning tips, if necessary.
 
Author
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Manno:
Can anyone confirm this for us?


In MIDP 1.0, MIDlets can share an RMS database as long as they belong to the same MIDlet suite (i.e. packaged together in the same JAD). In MIDP 2.0, you can decide whether you keep this behaviour or whether you want any MIDlet to access it.
 
Frank Manno
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for clearing that up Daryl... I remember reading somewhere that it was accessible. I did not know that it was an option available at the programmer's discretion. It makes more sense to allow the user to have that control rather than the developer.
 
Daryl Wilding-McBride
Author
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Manno:
It makes more sense to allow the user to have that control rather than the developer.


The developer has the choice in the openRecordStore method call. The authmode parameter can be AUTHMODE_PRIVATE (which mimics the MIDP 1.0 behaviour) or AUTHMODE_ANY (where any MIDlet on the device can access the database).
[ July 25, 2003: Message edited by: Daryl Wilding-McBride ]
 
Frank Manno
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Daryl Wilding-McBride:

The developer has the choice in the openRecordStore method call. The authmode parameter can be AUTHMODE_PRIVATE (which mimics the MIDP 1.0 behaviour) or AUTHMODE_ANY (where any MIDlet on the device can access the database).
[ July 25, 2003: Message edited by: Daryl Wilding-McBride ]


So if the developer uses the AUTHMOD_ANY constant, does that mean that his/her MIDlet can access any database on the device, or does it give permission to other MIDlets to access the databases which it creates?
If it's the former, it would defeat the purpose of security. I mean, any developer could write a program to erase everything in the RMS!
 
Ranch Hand
Posts: 1327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is J2ME easier to learn and apply or harder if one has good and strong foundation at J2SE?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

is J2ME easier to learn and apply or harder if one has good and strong foundation at J2SE?


Easier. Can you think of an example where a strong J2SE background would be a disadvantage for learning a technology based on the Java programming language and virtual machine?
 
Daryl Wilding-McBride
Author
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Manno:
So if the developer uses the AUTHMOD_ANY constant, does that mean that his/her MIDlet can access any database on the device, or does it give permission to other MIDlets to access the databases which it creates?


The developer who creates the RMS database decides whether it will be available to all MIDlets or only those within the same suite.
 
Daryl Wilding-McBride
Author
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I agree that it's easier if you have a J2SE background. J2ME is based on J2SE, so if you understand the "base", then it's easier to understand the additions and subtractions that comprise J2ME.
 
Frank Manno
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Daryl Wilding-McBride:

The developer who creates the RMS database decides whether it will be available to all MIDlets or only those within the same suite.


Okay... That makes more sense! I was beginning to think that the developer decides whether his app access OTHER databases, which doesn't make much sense -- security wise.
Thanks for clearing that up!
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gus Mus:
Hi I am new comer to J2ME,
have several questions to who already expert on it.
2. Do we have to care about the type of device ?
like the resolution and etc. Since Java should be write once run anywhere.
Thanks for the info


If you create a normal application using forms, etc. you will not have a problem. One of the features of J2ME is that it is device independent in that you tell it that you want a text box or a choice item and the device that the program is running on decides how to display that particular item. Your program might look different on each device but it will run the same.
Having said that there are ways to display by pixel EXACTLY what you want to appear on the screen but this is something that you would only want to use if say you were designing a particular type of game or something of that nature. As the platform matures we are seeing more and more emphasis on standards.
The only problem is that even though the platform is improving there aren't a lot of devices out there that have the latest MIDP 2.0 built in.
Later, Frank
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic