Transfering my game to the phone
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.
May I ask, what phone do you have? Most manufacturers offer a free download of pc connectivity software on their 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? =)
How do I make a wap page that I can download my game's jad file from? =)
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: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.
AddType text/vnd.sun.j2me.app-descriptor jadAddType application/java-archive jar
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...
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...
=)
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...
=)
Quote:Original post by walleThe .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!
The .jad file format is unknown to one phone, so I downloaded the .jar file instead...
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).
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 =)
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 =)
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?
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?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement