• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Testing for Optional Packages  RSS feed

 
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
 
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
 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!