• 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

Polish and importing

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok i shouldn't be making hard work of this but i am, if someone could help i'd be very grateful.

Developing in NetBeans 4.1 with Polish and am trying to include the wireless media package. So in my source i have:

import javax.wireless.messaging.*;

And in build.xml i have in the classpath:

<property name="polish.home" value="C:\Program Files\J2ME-Polish" />

<taskdef name="j2mepolish"
classname="de.enough.polish.ant.PolishTask"
classpath="${polish.home}/import/enough-j2mepolish-build.jar:${polish.home}/import/jdom.jar:${polish.home}/import/proguard.jar:${polish.home}/yguard-lib.jar:${wtk.home}/wtklib/kenv.zip:${polish.home}/import/wmapi.jar:"/>

Yet when i run it in test mode or release mode (it's just the demo polish project) i get package not found:

F:\Source\NetBean Projs\NewPolish1\build\test\Generic\midp2\en_US\source\de\enough\polish\example\MenuMidlet.java:37: package javax.wireless.messaging does not exist

import javax.wireless.messaging.*;

1 error

What simple step am i missing here?

Thanks,
Phil.
 
author
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I don't know about NetBeans, but in the WTK you would need to select in the settings that the project was to include the WMA APIs.
Messaging is not part of the standard MIDP2.0 specification, but is part of the JTWI specification. So you might also want to make that a requirement of the project.

Also don't forget to add permissions for calls to the WMA services, such as SMS. That would be an issue at runtime and would not get in your way for the compiling of your project.

Hope that helps.
-Shawn
 
Phil Brumby
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Shawn but all of that seems fine, within the project settings of NetBeans i have under Optional Packages Wireless Messaging API ticked and building project within NetBeans environment is fine, no error...

(i run a netbeans build to use debug, and polish to make use of it's UI stuff)

The problem comes with the ant run build.xml polish version, with it i'm assuming i have to include the wireless api in the classpath settings in the build.xml but it won't compile??

Anyone else shed some light?

 
Phil Brumby
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ooooh right the device requirements in build.xml!

changed Generic/midp2 to Generic/jtwi, bingo

I have exeeeeercised the demons, thanks Shawn.

Phil.
 
reply
    Bookmark Topic Watch Topic
  • New Topic