Converting from 1.4 to 1.1...

We are using -target 1.1 on javac, we need that to get it to run under 1.1.
It seems to be some issue with 1.3 where it cannot download the jar file properly, while 1.1 & 1.4 seem to work fine. We have tested with Sun 1.3 VM and had the same error with our unobfuscated one as well.
In short, I have no idea why 1.3 wiould fail when 1.1 & 1.4 seem to work fine :confused:

  • Dom

Well, I still get invalid magic number on Opera using the 1.4.2_01 plug-in, and there’s no excuse for that…

Cas :slight_smile:

Doesn’t work on the Mac (never has)

I saw a few prints in the java console that showed it was running some code… but then nothing appeared where the applet was supposed to be. There may have been a message about a recursive repaint call… I noticed it after so I’m not 100% sure it was your applet.

Macs : We’ve had PowerMac’s succesfully run the games (at least thats what the agent said in the server logs) so it works on some Macs now. Unfortunately we dont have any Macs, & Ive never used one, so its kinda hard to debug ???

Opera: Again, no idea, but Opera really hates us using an iframe to put the applet in. Most other browsers work so its Operas fault for being non-standard, or as they put it ‘more standard than others’ :-/ thats my excuse & Im sticking to it :stuck_out_tongue:

  • Dom

Both the error and the stacktrace indicate that Opera has nothing to do with the problem. Both the error and the stacktrace indicate that your obfuscator has everything to do with it. The error is being thrown by a standard JVM in a standard situation. No other applets throw this exception. Ergo, you’re doing something nonstandard and it’s broken it. Would you perhaps care to upload a non-obfuscated version?

Cas :slight_smile:

I’m still getting the ‘invalid bytecode’ error on Opera as well. Despite the fact that it works fine in IE6, this is the only applet i’ve ever had a problem with in Opera.

[quote]Ergo
[/quote]
Using that word is wrong on soooo many levels :wink:

We have found the problem - all we need now is the solution.
The issue is due to a PHP script that is called ‘tj.jar’, and this is what the games page references.
this checks the session cookie is valid, then sets up a session variable allowing access to the resources, then sends the real jar file to the client with a HTTP header of type ‘octet-stream’. If we replace this with the real jar file, it works ok with Opera and JRE 1.3.
We have tried setting the content type to be ‘application/x-java-archive’, but this doesn’t seem to help :frowning:
Anyone know if we need to be sending anything else in the headers?

  • Dom

[quote]We have found the problem - all we need now is the solution.
The issue is due to a PHP script that is called ‘tj.jar’, and this is what the games page references.
this checks the session cookie is valid, then sets up a session variable allowing access to the resources, then sends the real jar file to the client with a HTTP header of type ‘octet-stream’. If we replace this with the real jar file, it works ok with Opera and JRE 1.3.
We have tried setting the content type to be ‘application/x-java-archive’, but this doesn’t seem to help :frowning:
Anyone know if we need to be sending anything else in the headers?

  • Dom
    [/quote]
    Why don’t you post the headers here that you’re sending?

Header is simply (in PHP):


header(“Content-Type: application/octet-stream”);

if ( !readfile("…/wwwprivate/$appName") )
{
exit;
}

& Thats it.
1.1 & 1.4 seem to work fine. Its just Macs, 1.3, & Opera that throw a wobbly over this :-/

  • Dom

Simple answer - set up a packet sniffer (or a proxy server that prints out HTTP headers) and load an applet normally. See what other servers reply with, and copy them.

I expect there’s a few extra things that Opera would like to see, a content length and an expiry date to name but two.

Ok, tried that… Surprising results obtained:

Sending the jar:

Header is: Content-Type: text/html; charset=ISO-8859-1

And that is it. Opera seems happy with that.
Sent via PHP, I get a whole load of extra cache stuff tacked on by the PHP session, then the content type followed by the jar data. So Ive changed the type I send it as to be the ‘text/html’ (which seems a little crazy, but it works for the jars) and… No joy. 1.3 & Opera still give the same error message while 1.4, Mozilla & Netscape read it just fine.
Wierd…

  • Dom