@HansDampf: I donāt know what caused that error, but Iām glad itās working now.
[quote]The cursor did not go away though, which was a tad annoying.
[/quote]
Hm, I thought Mouse.setGrabbed(true) was supposed to get rid of the mouse pointer. ???
[quote]blah3 - Why is it Appleās stupid fault for not running when there isnāt a jnlp extension? Thats the only way Iāve seen any JWS apps work on my Mac.
[/quote]
It should start JWS when it sees the Mime type. The extension should be irrelevant. JNLP in PHP scripts that set the MIME type probably wonāt work on Mac eitherā¦
If you read the internet standards you will discover that ā.jnlpā is NOT of any meaning at all, it is part of a fileās name, and says nothing about the contents. I can rename a word doc to end .jnlp and that is FINE. The internet (well, separately for various parts, but they share the same standard) was desgined to have no problem with that. I will download that file from a website by clicking on an HREF and it will automatically and transparently load up Word, not webstart.
(except on OS X, which is crap)
MIME types transparently and perfectly handle all this, and all good OS Filing Systems have a similar mechanism (c.f. BeOS). Even MS is moving over to this (canāt come too soon; people have been ripping the piss out of MS for this weakness of their FSās for decades).
For apple to code against a filetype is not just a small bug, itās a fundamental failure to RTFM; IMHO itās outrageous for an internet app to refuse to work with circa 99.99% of all other internet apps. Shrug. Iām just bitter because it also means I now have to go and muck about with my server, adding workarounds for appleās bug. Iām not happy about that; my server is standards compliant, their OS is not.
Windows has no filesystem that stores MIME type. to my knowledge neither does Linux.
Mac OS X (which is a far cry from ācrapā, given it is the best OS commonly available IMHO) does not store MIME type either. It does have a mechanism for storing file type and creator in the filesystem metadata though, and perhaps that could have been used in this case.
But even Mac OS X is moving toward file extensions. They officially frown on using the filesystem āresourceā fork any more. I suspect this is to improve compatibility with basically every other system out there that never used proper metadata in the file system. (If only BeOS had a chance against the monopolist. I still have an original blue BeBox sitting around here somewhere - that was a sweet machine)
Also note that mime-type is a very unreliable standard. Often all you get for the mime-type from internet servers is application/octet-stream or some other generic silliness. I canāt count the number of types Iāve tried to download a JAR or ZIP file only to have the contents spewing forth in my browser window because the idiot server reported the type as text!
Like it or not (and to be clear I DONāT like it) the file extension is usually a more accurate indicator of the file type.
[quote]Blah^3, your rants are getting ridiculous.
[/quote]
I can accept that as a possibility :). Iām jetlagged at the moment too, so possibly not thinking clearly :(.
Howeverā¦
Fair enough (although there are ones available for doing it in linux and the next release of windows is supposed to have it built-in) - I didnāt say what I meant to there, but rather something rather dumb instead.
Interestingly, in a studio which is a Mac-shop, as soon as I mentioned this outloud, a couple of people said āoh, that explains some other problems Iāve had with OS Xā.
My real point was that everyone knows itās stupid to base decisions off extension (although thanks to DOS most people have to live with it / support it). Meanwhile, MIME does work perfectly well (yes, you can abuse it, simply since itās an extensible standardā¦) and is used by all web browsers AFAIAA and an awful lot of application software - many things if they can get a MIME-type, they will use it. If it has to open a file from a primitive FS (FAT, ext2, etc) then it will have to guess instead.
Sure, but ā¦ only on misconfigured web servers, and those are a minority.
Out of interest, is this because you go to lots of mac sites? : Seriously, I can count on one hand the number of times this has happened to me with a JAR file in the last 4 years, and I canāt remember it happenign with a ZIP any time in the last 7 years.
OTOH, I do occasionally see it happen to an MSWord file, which is amusing - perhaps linux sysadmins willfully not setting up the .doc mapping correctly?
Meanwhile, in the first two weeks of using OS X at this studio I had it happen on 20 out of 40 downloads from mac-only websites.
I didnāt think anything of it at the time, but now it comes to mind as suspicious.
OK, if that were true then I would happily accept your dismissal of my rant.
However, it has no similarity to my experiences of the internet over the last 5 years (save for recent experiences on mac sites). On linux I rely entirely on MIME type mappings and they are very rarely wrong. Since mozilla explicitly tells me what each MIME type is at it executes it, I know what percentage are misclassified (approx 0.1%-1% of the 500 or so things I download each month)
FWIW, my thinking is this: Internet transferred files are not living in a file system, so the only thing we have to describe what to do with it is the MIME type. Weāre not setting up MIME types on the server only to have some client react on the file on file extension only, are we?
If some browser, jws client or whatever then only looks at the file extension (on a non-MS OS no less!) and completely disregards the MIME type, this seems like a bug to me. Or at least worth a RFE
I donāt think the JNLP spec clearly demands files ending with .jnlp in order to have a JWS client to do the right thing; it only mentions .jnlp as the ādefault file extensionā in the part how to set up MIME types on the server.
Having said that, the wisest thing to do right now is probably just to stick to .jnlp file extensions
c.f. other topic (about to post in āautomated webstart makerā) but Iāve just done a patch that might fix this. Itās working locally using JNLP extension, but Iāve got no macs to hand and havenāt yet tested a real game on the live server.
erikD - Any ideas on why the mouse cursor wasnāt hidden on my Mac?
swp/erikD/blah3 -
I donāt quite get the mime type problem. When I looked at the java games factory source for that page it just had an anchor tag. I didnāt see anything about meta-data or mime-type info.
When I looked at the mime types Netscape 7, on WinXP, has listed, it showed application/x-java-jnlp-file. It also had jnlp listed as its extension. Other mime types had the extension field blank. So how does this relate to the issue on the Mac browser? Is it because the mime type isnāt registered? Not registered properly? If you used FireFox on the Mac, would things start to work?
IMHO, if you know the file extension properly identifies a file, then you ought to use it. If you have some sort of meta-data to go along with it, then use them both.
No, you wouldnāt - itās nothing to do with HTML. Itās part of a lower-level protocol, HTTP, which means that whenever I send you a file (where āsendā could mean many things, even just a file being copied and pasted) the HTTP stream contains identification of the filetype in a rich manner.
So, what you want to do is telnet to port 80 on a webserver, and type:
GET [path to file] HTTP/1.1
Host: [domain name of site you visited]
[hit enter twice]
In the response, youāll see a line:
Content-type: text/html
(or something else, like jnlp)
Good question. I donāt know at what point between appleās browser and appleās OS and appleās FS and appleās JVM the information is being lost, but this is critical information.
For instance, on linux, your web browser will usually ONLY use the mime-type to decide what to do.
I didnāt notice this problem on Mac sites specificallyā¦ It has only been within the last 2 years that I have even had a Mac.
I donāt mean to argue the point much, since I am in agreement that identifying file types by extensions is a stupid product of a very poor OS (DOS). Back in the days when I was using an Amiga I would rant on and on about the idiotic file extension thing that DOS Win3.1 users dealt with.
But now that I think about it, I see that the file name is still the only significant thing about a file that casual users are aware of. To ask my mom to comprehend the computer jargon that comes with MIMe types is unreasonable. Thankfully, even Windows will map extensions to a text description of the file type. Stupidly Windows HIDEs the extension by default so as to totally bugger things up and encourage people to open dangerous attachments :). But this mapping is constantly getting munged about by applications that like to think they āOWNā certain extensions. The system is severely flawed.
The concept that the Mac has with a resource fork that holds all sorts of metadata about a file is a good one, until it has to interact with the rest of the world. Files have to be packed in fancy .bin wrappers and such to survive the trip to foreign filesystems and back. This is the sort of thing that is crying out for some sort of standardisation. But I think that a practical way to standardise on this is too improbable. A simple named chunk of data is the best common ground we have for storing files. Heck in some cases even file timestamps donāt survive file transfers & copyingā¦ and they appear to be more universal than other bits of metadata.
The fancy indexing features that might happen some day on Windows, and will be available in a month or to for the Mac will likely help.
Perhaps then the appropriate type can be added to the metadata on the fly by introspection of the file data, so that type information is readily accessible when getting file listings and such.
Anywayā¦ if you have a JNLP file, why NOT give it an extension? Until all OSās and tools are ready to clearly indicate file type somewhere, thatās the best we have.