Jump to content
  • Advertisement
Sign in to follow this  
walle

Transfering my game to the phone

This topic is 4614 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. Just got started on j2me, and now I've made a pong game. I've tested it in two emulators...but now I want to test it on my java powered phone...how do I get the jad file there? Been searching the web for a while now, maybe not soo good at it =) Ok, I can't connect my phone to the computer because I don't have the drivers(that you have to buy from the manufactor) but Iv'e heard something about making a wap page and download the jad file from that...but how do you do that? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
May I ask, what phone do you have? Most manufacturers offer a free download of pc connectivity software on their sites.

Share this post


Link to post
Share on other sites
Ok, I'm going to test it on a nokia (not my phone) I have a motorola c550, and I've looked at their page. But I want to make the game downloadable later on anyway, so maybe I'll refrase my question...
How do I make a wap page that I can download my game's jad file from? =)

Share this post


Link to post
Share on other sites
If you are running an Apache server, create a new file called .htaccess and put it in the same folder as your .jad and your .jar files. It needs to contain these lines:
AddType text/vnd.sun.j2me.app-descriptor jad
AddType application/java-archive jar
If the file already exists, just add those lines to it. Now, all you need to do is point your phone's browser at the .jad file and it should download the .jar properly.

Share this post


Link to post
Share on other sites
Thanks Ben! It works, I think, couldn't open the game on the phone, but I could download it. Strange that it didn't work though...

Share this post


Link to post
Share on other sites
Hehe. Works on the emulator but not on the phone?

<sarcasm>How odd!</sarcasm>

;)

Share this post


Link to post
Share on other sites
Works on two emulators actually =)

The .jad file format is unknown to one phone, so I downloaded the .jar file instead...got an error that said that I couldnt create classes on the phone or something(don't have the phone here now) and on another one I couldn't download it, just stood something about MIDP 1.0 and so...

=)

Share this post


Link to post
Share on other sites
Quote:
Original post by walle
The .jad file format is unknown to one phone, so I downloaded the .jar file instead...
The .jad file is just a pointer to the .jar file, containing a few bits and pieces of information (file size, author, that sort of thing) so provided that points to the correct .jar file all should be good!

What happens if you point your phone at http://benryves.com/wap/Crates3D.jad? That's a simple MIDP 1.0 no-bells-and-whistles game so should run on anything, and the .jad seems to be set up correctly (works on my 3510i).

Share this post


Link to post
Share on other sites
Yes it downloads correctly(yours) but mine doesn't =(
And I even tried taking your .jad file and replacing your data with mine...(jar file author and vendor...and I removed the description...but no...
Someone said that you should have an absolute path to your .jar file like: www/games/pong.jar in my webserver....
Well, here is the error message I got when I downloaded only the .jar file:
Cannot create class in system package

Great game Ben actually played it a bit before I tried fixing my troubles =)

Share this post


Link to post
Share on other sites
Heh, thanks, I can't claim credit on the concept, it's just a conversion.
This tool can check to see if your webserver is set up correctly. My .jad file returns Content-Type: text/vnd.sun.j2me.app-descriptor and the .jar returns Content-Type: application/java-archive, which are both correct. The main problems I've had with getting phone games to download are incorrect headers being sent.
As for that oddity when it comes to running the game - are you using features the phone doesn't support? Are you using, for example, MIDP 2.0 code and trying to run it on a MIDP 1.0 device? As for these emulators, are they for the correct model of phone?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!