Hi all,
I am new to using Java Web Start and writting .jnlp files and am
running into some problem. I have written this .jnlp file to deploy my
application:
---------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://myweb..." href="Clear.jnlp">
<information>
<title>Clear</title>
<vendor>Me</vendor>
<offline-allowed/>
</information>
<security>
</security>
<resources>
<j2se version="1.3+"/>
<jar href="Clear.jar" main="true"/>
</resources>
<application-desc>
<argument>-java</argument>
<argument>-classpath</argument>
<argument>classes</argument>
<argument>-classname</argument>
<argument>source.Version1</argument>
</application-desc>
</jnlp>
------------------------------------------
The problem is that when I run the file on Firefox it does what it is
supposed to, deploys the program, however, when I try it on IE it just
displays the XML text above and it does not launch. Any ideas???
Jay
Andrew T. - 12 Jul 2006 20:43 GMT
...
> I am new to using Java Web Start and writting .jnlp files and am
> running into some problem.
...
> The problem is that when I run the file on Firefox it does what it is
> supposed to, deploys the program, however, when I try it on IE it just
> displays the XML text above and it does not launch. Any ideas???
IE has problems with JNLP files when no Java Plug-In is
installed, but the symptoms do not match yours and your
FF result indicates the Plug-In has correctly registered with
at least one browser.
What happens when you double click a .JNLP on the
local file-system? Does it 'open in IE'?
Andrew T.
Jay - 12 Jul 2006 21:08 GMT
> What happens when you double click a .JNLP on the
> local file-system? Does it 'open in IE'?
I double clicked the .jnlp file on my Desktop and IE tried to open it
for a split of a second and then nothing happens, no browser is opened
and the program is not launched.
Jay
IchBin - 12 Jul 2006 21:31 GMT
>> What happens when you double click a .JNLP on the
>> local file-system? Does it 'open in IE'?
[quoted text clipped - 4 lines]
>
> Jay
If it was another browser I'd say it looks like the browser does not
have any association for a jnlp file type assigned. I do not know how to
set that in IE.
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Jay - 12 Jul 2006 21:42 GMT
What is confusing me even more is that after viewing some sample apps
on line at http://java.sun.com/products/javawebstart/demos.html that
use jnlp files to launch the applications I am able to open them with
both Firefox and IE and everything runs fine.
I am starting to think that this is a server problem related with mime
types, but if so why would it work on one browser and not another?
Jay
Andrew T. - 12 Jul 2006 21:49 GMT
> > What happens when you double click a .JNLP on the
> > local file-system? Does it 'open in IE'?
>
> I double clicked the .jnlp file on my Desktop and IE tried to open it
> for a split of a second and then nothing happens, no browser is opened
> and the program is not launched.
OK. Now open a folder, go to ..
Tools | Folder Options | File Types
Sort the list by extension (I think it's the default) and see
if JNLP is registered, and if it is associated with IE
(it should be associated with 'Java (TM) Web Start Launcher').
Andrew T.
Jay - 12 Jul 2006 22:05 GMT
> OK. Now open a folder, go to ..
> Tools | Folder Options | File Types
>
> Sort the list by extension (I think it's the default) and see
> if JNLP is registered, and if it is associated with IE
> (it should be associated with 'Java (TM) Web Start Launcher').
JNLP is registered but all it says is:
Opens With: Java(TM) Web Start Launcher
It doesn't say anything about its association with IE.
Jay
IchBin - 12 Jul 2006 21:23 GMT
> Hi all,
>
[quoted text clipped - 34 lines]
>
> Jay
Looks like IE does not have any association for a jnlp file type assigned.
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Thomas Fritsch - 12 Jul 2006 23:22 GMT
> I am new to using Java Web Start and writting .jnlp files and am
> running into some problem. I have written this .jnlp file to deploy my
[quoted text clipped - 3 lines]
> <?xml version="1.0" encoding="UTF-8"?>
> <jnlp spec="1.0+" codebase="http://myweb..." href="Clear.jnlp">
[...]
> </jnlp>
> ------------------------------------------
>
> The problem is that when I run the file on Firefox it does what it is
> supposed to, deploys the program, however, when I try it on IE it just
> displays the XML text above and it does not launch. Any ideas???
Please make sure, that your web *server* is configured to map .jnlp files to
the required MIME-type.
See FAQ: "Why does my browser show JNLP file as plain text?"
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html#215

Signature
Thomas
Jay - 13 Jul 2006 17:56 GMT
> Please make sure, that your web *server* is configured to map .jnlp files to
> the required MIME-type.
> See FAQ: "Why does my browser show JNLP file as plain text?"
> http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html#215
Yes, I'm starting to think it is a server problem, but is there any way
of programatically setting the mime type? - that would be a lot easier
than having to change server settings.
Jay
Andrew T. - 13 Jul 2006 18:08 GMT
> > Please make sure, that your web *server* is configured to map .jnlp files to
> > the required MIME-type.
> > See FAQ: "Why does my browser show JNLP file as plain text?"
> > http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html#215
>
> Yes, I'm starting to think it is a server problem,
Put your suspicions to rest by checking it.
<http://mindprod.com/jgloss/mime.html>
What's the URL of your JNLP?
>...but is there any way
> of programatically setting the mime type?
Yep. That's what the server's for. It sends the header
that specifies the MIME type.
Andrew T.
Jay - 13 Jul 2006 18:41 GMT
> >...but is there any way
> > of programatically setting the mime type?
>
> Yep. That's what the server's for. It sends the header
> that specifies the MIME type.
But that involves changing server settings, if the server doesn't send
the header
that specifies the MIME type already. I was looking for a way to set
the mime type in my code.
Jay.
Oliver Wong - 13 Jul 2006 21:36 GMT
>> >...but is there any way
>> > of programatically setting the mime type?
[quoted text clipped - 6 lines]
> that specifies the MIME type already. I was looking for a way to set
> the mime type in my code.
In what code? The source code for the server? Yes, you could modify the
server itself to do that, but wouldn't it be easier to modify the settings
via a configuration file? If instead, you mean the Java code of the program
the user is downloading, by the time that code executes, the download
already occured, which means the MIME type was already sent, and it's too
late.
- Oliver
Jay - 14 Jul 2006 03:02 GMT
Finally everything works fine now. It was a server problem, the
settings had to be updated.
application/x-java-jnlp-file -> .jnlp
Thanks to everyone for your advice.
Jay
Andrew Thompson - 14 Jul 2006 09:49 GMT
> Finally everything works fine now.
Hooray! Glad you sorted it.
Andrew T.