• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to invoke MIDlets

 
glkishore
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have written some midlets, i wants to keep thses in my webserver and call it from my emulatorso that i can run it there.
Is it possible to do this?
if yes, some body can give me how to do it...please
thank you
glkishore
------------------
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can basically if you generate midlets using j2me tool kit then in the app\ directory and under ur project folder their exist one class or file or JAD file put that file in to the web and then access it from ur emulator..
Assume u have Xyz.jad ..
just copy this file and put it in the web folder
and then access it by using www.myhomepage.com/Xyz.jad
also visit the web site., http://www.corej2me.com/SourceCode/downloadPng/index.htm
Regards
Balaji

 
glkishore
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Balaji,
thanks for the replay. My exact problem is:
if you worte a game midlet and put that in your website, i know the url, and i want to access it.think i have all permissions. How to do it. (Like accessing the website from a browser)
i am able to access the servlets and files from the web server, where for this, program resides in my plam device(emulator). if i am accessing some others, program will be some where not on my device.
please let me know how to this, i am stuck here.
Thank you.
glkisohre
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry that i'm not aware of ur problem.
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i work with j2me at wrox
we dont know of any midlet browser but that is a very very good idea. If you write one you would be a very popular man with a lot of people. i'm afraid that if you want one you would probably need to write it yourself in the near future although now the idea is out there it shouldnt be long before someone does write one (hundreds of the things will be not far behind as everyone reinvents the wheel). Between all the editors for the mobile book from wrox we couldnt think of any out there.
I would also recommend that you write as little of your application code as possible within the midlet itself. Because midlet is such a narrow API and is likely to change or become obsolete, the best idea for writing your application is to define a java class that encapsulates what you are trying to do in your code and use that class from within your midlet. That way if you need to port your application to another api (ssay the PDA P in a few years time) you dont have all the code mixed up with midlet code and GUI code that will probably be obsolete by that point.
Its a little difficult to explain what I mean but here is an attempt. Say I want my application to add two numbers, instead of writing a midlet that accepts input, adds the two numbers itself and displays it, I would first write a calculator class that has the following methods
setFirstNumber()
setSecondNumber()
addTwoNumbers() throws IllegalStateException
then then midlet would be responsible for calling the various methods. Why? because then when I want to port this to a servlet, instead of trying to work out what the code is trying to do and cutting and pasting code snippets into a servlet I just have to call these methods in the Calculator class I defined.
does that make sense?
chanoch
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"glkishore",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in again with a new name which meets the requirements.
Thanks.
--Mark
 
Richard Taylor
Author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by glkishore:
i have written some midlets, i wants to keep thses in my webserver and call it from my emulatorso that i can run it there.
Is it possible to do this?
if yes, some body can give me how to do it...please
thank you
glkishore

Hmm, I think you mean you want to be able to load your MIDlet onto your device from a remote server? Is that right?
If so, then it is possible, BUT the bads news is:
- there's no standard way of doing it
- its not part of the MIDP spec
- its a function of the device, so its the manufacturer who implements it
The main reason that you cannot write your own MIDlet loader is one of security - if I write a rogue MIDlet loader, and you innocently download it it to your phone, my MIDletLoader (or whatever its called) immediately zooms off to the net and loads several more of my dodgy MIDlets, thus flooding your poor device with rubbish. Not nice.
So instead, manufacturers each write their own Java Application Manager (JAM) to control the downloading fo MIDlets. Sun did supply a reference implementation of one - I'm not sure it comes with J2MEWTK though - probably with the MIDP spec.
So, what can you do?
Well, without a physical device, not a lot, although its worth noting that the first release of MIDP 1.0 (before J2MEWTK) came with the ability to load MIDlets remotely into the emulator, which was sweet. Or possibly try and find the JAM source code, and see if you can make use of that. But not commercially, of course....
 
glkishore
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Herschberg:
"glkishore",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in again with a new name which meets the requirements.
Thanks.
--Mark

hello mark,
i have read naming convention, it says if i am a register user, then i have to register again to change the name. please let me know can i change my ID or i have to register again for the name which follows naming convention.
please....
glkishore

------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic