Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newbie to J2ME

 
Igor Janicki
Greenhorn
Posts: 9
Eclipse IDE Firefox Browser Windows Vista
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am newbie to J2ME. However having a nice experience with Java, J2EE ... since JDK 1.02 up to JDK 1.6


Now involved in no so complex project for mobile. A MIDlet with HTTP network communication. The crucial problem is receiving and parsing XML data.

So
● I have installed Java_ME_platform_SDK_3.0.5, SPRINT WTK and J2ME plugin for Eclipse.
● I decided to use Eclipse due to my experience with the framework. I use Version: 3.5.2
● I selected kxml2 for XML parsing and handling.
● the anticipated target (first approach) is MIDP-2 with CLDC-1.1
● my OS is Vista (I know ... ).



Unfortunately I faced some troubles. (for a newbie).


* The first one is related to emulator, which does not work so good. Just launched test starts slowly ending with message "couldn't connect to virtual machine.". So I found that I can use the displayed emulator interface to load relevant jad file.

May be I have to install another devices ...

The one I tried to use is:




* The second is debugging of HTTP connection. Is it possible to do it making simple Java tests ?

I added a standard main() method (as I used to do in normal Java projects)

but:

HttpConnection connection = (HttpConnection)Connector.open(url);

returns null



what's wrong ?


I would appreciate any suggestion or even a hint.


 
Walter Gabrielsen Iii
Ranch Hand
Posts: 158
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Igor Janicki wrote:I added a standard main() method (as I used to do in normal Java projects)


Java ME doesn't use the main() method. You need to extend the javax.microedition.midlet.MIDlet class with a subclass and implements these methods: destroyApp(), pauseApp(), startApp().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic