Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Testing for Optional Packages

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to test what optional J2ME packages are installed on a device at runtime?

For example, say I want to use JSR-75, but I'm not sure if the device has that API. Perhaps it's an optional install for the end user, etc.

What's the best way to test for this? Class.forName?

Thanks,

Drew
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there is a way to do it at run-time, but you can try and use the pre-processor capabilities of J2MEPolish.

Check this link:

support an API
 
Chaitanya Varanasi
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think this site might help you.
http://www.benhui.net/modules.php?name=Midp2Phones.

This site contains all the MIDP Phones and also which Optional Packages they support as well as the CLDC and MIDP versions which those devices support.

Hope that Helps,
Chaitanya V
 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ended up just catching the Class Not Found error.

Apparently, you can also check for a System property:

What are the defined J2ME system property names?

Drew
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cool.

Thanks for the link, I didn't know that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic