How can I download java game?

Hi everyone, sorry for my english, it is not my native language.

I have Game.Jar file, which is java game for Nokia ,and I uploaded this file into database.

Now I have a filed, type of byte[] (array of bites)

next, I generate URL like http://site.com/getfile.xxx?id=10, and then user go to this URL via WAP, and trying to send him byte[] array with java game data.

But I don't know which Content-Type i must send :(

I trying to send Content-Type: application/jar , but after downloading game into mobile phone, the game doesnt open :(((

please help me!

[596 byte] By [Victor.Deva] at [2007-10-1 15:46:20]
# 1
not sure if it actually will make a difference, but the actual MIME type of a jar file is application/x-java-archive
Woogleya at 2007-7-10 23:37:14 > top of Java-index,Other Topics,Java Game Development...
# 2

excuse me, it's actually application/java-archive

This works for me (PHP) but unfortunately you have to rename the downloaded file to .jar:

<?php

$file = fopen("MimeTest.jar","r");

header("Content-Type: application/java-archive");

$text = fread($file,filesize("MimeTest.jar"));

print $text;

fclose($file);

?>

You can try it out here: http://woogley.net/misc/MimeTest.php

Download that and rename it to .jar and see if the data stayed in tact..

Woogleya at 2007-7-10 23:37:14 > top of Java-index,Other Topics,Java Game Development...
# 3
Really thanks to ALL!! :)I will try this way! :)
Victor.Deva at 2007-7-10 23:37:14 > top of Java-index,Other Topics,Java Game Development...
# 4
Hi, I'm italian, I haven't understand how to download games via wap, can you explain more simply? Excuse for my english...
wingman87a at 2007-7-10 23:37:14 > top of Java-index,Other Topics,Java Game Development...