Ok I created a game. When a user goes to the wap site to download the game I have created a
servlet that generates a uniqueID and then creates a
java file with the uniqueID in it..
public final class GameProperties {
public final static long userID = 23423526;
public final static int gameID = 1;
public long getUserID(){ return userID;
}
}
I then compile this java file on the server and then add it to the games jar file. This works!
The problem is when I have created the jar file I use an outputstream to send the file to the phone. It works on most of the phones I use to
test on, Nokia 6230, Nokia 3510i, Sony Ericsson K700i, Motorolo V80 and Motorola V500. But on the Sony Ericsson T630i I get the error "You client is not allowed to access the requested object" and on the Sharp GX-30 I get "unsupported content type"
So instead I tried to store the modified jar file on the server and use the jad file to send a request to the servlet to modify the jar file. This doesn't work on any phone. Would it be because the file size in the jad file is different from the actual size of the jar file?
I think this is the only possible way of giving a user a unique ID from the server. If anyone has any other way that will stop me having to modify the jar file (I've already tried modifying the jad file and its no good cos some phones don't download them) it would be a great help