You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Greg Brown <gk...@mac.com> on 2009/06/19 17:39:41 UTC
JNLP help
Hi all,
I'm trying to add JNLP files to the WARs produced by the deploy
target. I want the files to use a relative codebase so we can test
them locally (and also for maintainability reasons). However, I am not
having any luck getting this to work.
I generate the JNLP files using the same token replacement approach
we're using for the HTML files. Here's the JNLP template for the
Kitchen Sink app:
http://svn.apache.org/repos/asf/incubator/pivot/trunk/demos/www/kitchen_sink.template.jnlp
I don't see anything obviously wrong with it, yet when I try to launch
the generated JNLP file, I'm told that:
"The field <jar>href has an invalid value: lib/pivot-core-1.3-
incubating.jar,lib/pivot-core-1.3-incubating.jar"
The lib directory does exist, as does the pivot-core-1.3-
incubating.jar file.
I don't have a lot of experience with JNLP, so maybe I'm doing
something wrong. Does anyone have any suggestions?
Thanks,
Greg
Re: JNLP help
Posted by Greg Brown <gk...@mac.com>.
>> I want the files to use a relative codebase so we can test them
>> locally (and also for maintainability reasons). However, I am not
>> having any luck getting this to work.
>
> I tried too various combinations of codebase and href, without
> success, with similar errors. Internet resources tell it should work
> (although they point more to applets than to applications) but not
> for me (Windows XP).
Well, I'm glad to hear that I'm not the only one having difficulty. ;-)
> For what it is worth, reference at http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html
> says you should use a <j2se> tag, not a <java> one like I see in
> your template.
Originally, I had it as "j2se", but the element section of that
document lists "java" first and "j2se" as optional, so I changed it. I
hadn't noticed that, throughout the rest of the doc, they use "j2se".
I think Sun needs to clean this page up a bit.
Re: JNLP help
Posted by Sandro Martini <sa...@gmail.com>.
Hi to all,
after some days off-line I'm back ...
There should be a dedicated Servlet that does the substitution inside
jnlp files, as in Sun doc/demos (
http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/downloadservletguide.html
), and you can find it inside JDK sample/jnlp/servlet, .
Since Java 6 Update 10 should be no more required ... but from what
I've read here it seems to be still required :-) or if not the
Servlet, with jsp or other tricks ...
Some year ago (when i used Web Start for deploy real-world
applications) i used some jsp pages to generate and fill jnlp file,
and i agree is not the best ...
For local (relative) paths i've read something on wrong jar caching,
and i don't know if has been solved now. If someone tries, can tell,
please ?
Ah, to simplify things I've never used the version-download feature,
nor the jardiff, they could be very useful but i had enough problems
with the rest ... but was in the past (some years ago).
> Originally, I had it as "j2se", but the element section of that document lists "java" first and "j2se" as optional, so I changed it. I hadn't noticed that, throughout the rest of the doc, they use "j2se".
Ok, but <java> will require Java 6 (maybe Update 10), so for Pivot 1.3
no problem.
> I think Sun needs to clean this page up a bit.
I think that Sun should rewrite some parts of this from scratch ...
and from another point of view i think they have created their new
packaging system (IPS, for Solaris, and for all main other platforms)
to solve some of these issues.
In next months I'll make some experiments with it, and Pivot but using
a dedicated SecurityManager to ensure (ad-hoc test evil) Pivot apps
cannot make problems or damages to the system ... if someone is
interested, tell me.
An useful trick could be to use the <extension> mechanism of Web Start:
split jnlp files in one (or more) with the definition of Pivot-only
jars (for example one with only pivot jars, one with also dependency
jars, etc) in dedicated jnlp files (standard, using the component-desc
syntax), and the user-specific jnlp file linking to them, so i would
never touch them.
I could also point to jars published in the main Pivot Site, to ensure
the (online) usage of standard jars ... on this i wrote a mail some
week ago but none answered ... tell me if mow someone is interested.
In this case another useful trick could be to have on the site also
the pack.gz version of the jars ... but attention with signed jars,
they have to be packed in a different way (there is a doc describing
it).
Tell me for a sample or other info or tests ...
Bye,
Sandro
Re: JNLP help
Posted by Greg Brown <gk...@mac.com>.
Yeah, I could do that. I am packaging the JNLP files in a WAR - I
could just use JSP to generate them. But that's annoying, since
relative codebases are supposed to be supported. >:-(
On Jun 19, 2009, at 5:10 PM, Philippe Lhoste wrote:
> On 19/06/2009 22:18, Greg Brown wrote:
>> That's a good workaround for launching the files locally - thank
>> you for digging that up. Unfortunately, it won't work when
>> deploying the JNLP files to a web server.
>
> In that case, several pages I saw advice to do it the old way
> (before it could use relative codebases): generate the right path
> when serving the JNLP. Unless I don't fully understand your use case.
>
> --
> Philippe Lhoste
> -- (near) Paris -- France
> -- http://Phi.Lho.free.fr
> -- -- -- -- -- -- -- -- -- -- -- -- -- --
Re: JNLP help
Posted by Philippe Lhoste <Ph...@GMX.net>.
On 19/06/2009 22:18, Greg Brown wrote:
> That's a good workaround for launching the files locally - thank you for
> digging that up. Unfortunately, it won't work when deploying the JNLP
> files to a web server.
In that case, several pages I saw advice to do it the old way (before it
could use relative codebases): generate the right path when serving the
JNLP. Unless I don't fully understand your use case.
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
Re: JNLP help
Posted by Greg Brown <gk...@mac.com>.
That's a good workaround for launching the files locally - thank you
for digging that up. Unfortunately, it won't work when deploying the
JNLP files to a web server.
Looks like it might be time to submit another bug report to Sun...
On Jun 19, 2009, at 4:16 PM, Philippe Lhoste wrote:
> Of course, as soon as I hit send, I had the idea to look at the
> JavaFX forum which has the same problematic (have to launch
> applications via JNLP).
> I found this thread: http://forums.sun.com/thread.jspa?forumID=934&threadID=5390135
> which gave the solution:
>
> <jnlp spec="6.0+" codebase="file:.">
>
> Works on my computer!
>
> (I tried before: ".", "file:/.", "file:///.", and some other
> combinations! Of course, not the one which works...)
>
> --
> Philippe Lhoste
> -- (near) Paris -- France
> -- http://Phi.Lho.free.fr
> -- -- -- -- -- -- -- -- -- -- -- -- -- --
Re: JNLP help
Posted by Philippe Lhoste <Ph...@GMX.net>.
Of course, as soon as I hit send, I had the idea to look at the JavaFX
forum which has the same problematic (have to launch applications via JNLP).
I found this thread:
http://forums.sun.com/thread.jspa?forumID=934&threadID=5390135
which gave the solution:
<jnlp spec="6.0+" codebase="file:.">
Works on my computer!
(I tried before: ".", "file:/.", "file:///.", and some other
combinations! Of course, not the one which works...)
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
Re: JNLP help
Posted by Philippe Lhoste <Ph...@GMX.net>.
On 19/06/2009 17:39, Greg Brown wrote:
> I want the files to use a relative codebase so we can test them locally
> (and also for maintainability reasons). However, I am not having any
> luck getting this to work.
I tried too various combinations of codebase and href, without success,
with similar errors. Internet resources tell it should work (although
they point more to applets than to applications) but not for me (Windows
XP).
> I don't have a lot of experience with JNLP
Neither me... :-(
For what it is worth, reference at
http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html
says you should use a <j2se> tag, not a <java> one like I see in your
template.
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
Re: JNLP help
Posted by Greg Brown <gk...@mac.com>.
Thanks. That one uses an absolute codebase, like the one on the Wiki:
http://cwiki.apache.org/PIVOT/index.data/kitchen_sink.jnlp
I'm trying to use a relative codebase. It is supposedly supported in
Java 6 and above, but I can't seem to get it to work.
On Jun 19, 2009, at 1:32 PM, Todd Volkert wrote:
> Unfortunately, I'm rushing out the door, so I can't take a look
> right now, but for reference, attached is a JNLP file that I use for
> a Pivot app that is known to work.
>
> -T
>
> On Fri, Jun 19, 2009 at 11:39 AM, Greg Brown <gk...@mac.com> wrote:
> Hi all,
>
> I'm trying to add JNLP files to the WARs produced by the deploy
> target. I want the files to use a relative codebase so we can test
> them locally (and also for maintainability reasons). However, I am
> not having any luck getting this to work.
>
> I generate the JNLP files using the same token replacement approach
> we're using for the HTML files. Here's the JNLP template for the
> Kitchen Sink app:
>
> http://svn.apache.org/repos/asf/incubator/pivot/trunk/demos/www/kitchen_sink.template.jnlp
>
> I don't see anything obviously wrong with it, yet when I try to
> launch the generated JNLP file, I'm told that:
>
> "The field <jar>href has an invalid value: lib/pivot-core-1.3-
> incubating.jar,lib/pivot-core-1.3-incubating.jar"
>
> The lib directory does exist, as does the pivot-core-1.3-
> incubating.jar file.
>
> I don't have a lot of experience with JNLP, so maybe I'm doing
> something wrong. Does anyone have any suggestions?
>
> Thanks,
> Greg
>
>
> <linkvoice.jnlp>
Re: JNLP help
Posted by Todd Volkert <tv...@gmail.com>.
Unfortunately, I'm rushing out the door, so I can't take a look right now,
but for reference, attached is a JNLP file that I use for a Pivot app that
is known to work.
-T
On Fri, Jun 19, 2009 at 11:39 AM, Greg Brown <gk...@mac.com> wrote:
> Hi all,
>
> I'm trying to add JNLP files to the WARs produced by the deploy target. I
> want the files to use a relative codebase so we can test them locally (and
> also for maintainability reasons). However, I am not having any luck getting
> this to work.
>
> I generate the JNLP files using the same token replacement approach we're
> using for the HTML files. Here's the JNLP template for the Kitchen Sink app:
>
>
> http://svn.apache.org/repos/asf/incubator/pivot/trunk/demos/www/kitchen_sink.template.jnlp
>
> I don't see anything obviously wrong with it, yet when I try to launch the
> generated JNLP file, I'm told that:
>
> "The field <jar>href has an invalid value:
> lib/pivot-core-1.3-incubating.jar,lib/pivot-core-1.3-incubating.jar"
>
> The lib directory does exist, as does the pivot-core-1.3-incubating.jar
> file.
>
> I don't have a lot of experience with JNLP, so maybe I'm doing something
> wrong. Does anyone have any suggestions?
>
> Thanks,
> Greg
>
>
Re: JNLP help
Posted by Greg Brown <gk...@mac.com>.
I have tried launching it from the file system as well as from a web
server - no luck either way.
On Jun 19, 2009, at 12:07 PM, Christopher Brind wrote:
> Are you launching it locally via a server/web browser?
>
> If the former, is it supposed to work like that?
>
> If the latter, are you able to access those jars directly through your
> browser?
>
> Cheers,
> Chris
>
>
>
> 2009/6/19 Greg Brown <gk...@mac.com>
>
>> Hi all,
>>
>> I'm trying to add JNLP files to the WARs produced by the deploy
>> target. I
>> want the files to use a relative codebase so we can test them
>> locally (and
>> also for maintainability reasons). However, I am not having any
>> luck getting
>> this to work.
>>
>> I generate the JNLP files using the same token replacement approach
>> we're
>> using for the HTML files. Here's the JNLP template for the Kitchen
>> Sink app:
>>
>>
>> http://svn.apache.org/repos/asf/incubator/pivot/trunk/demos/www/kitchen_sink.template.jnlp
>>
>> I don't see anything obviously wrong with it, yet when I try to
>> launch the
>> generated JNLP file, I'm told that:
>>
>> "The field <jar>href has an invalid value:
>> lib/pivot-core-1.3-incubating.jar,lib/pivot-core-1.3-incubating.jar"
>>
>> The lib directory does exist, as does the pivot-core-1.3-
>> incubating.jar
>> file.
>>
>> I don't have a lot of experience with JNLP, so maybe I'm doing
>> something
>> wrong. Does anyone have any suggestions?
>>
>> Thanks,
>> Greg
>>
>>
Re: JNLP help
Posted by Christopher Brind <br...@brindy.org.uk>.
Are you launching it locally via a server/web browser?
If the former, is it supposed to work like that?
If the latter, are you able to access those jars directly through your
browser?
Cheers,
Chris
2009/6/19 Greg Brown <gk...@mac.com>
> Hi all,
>
> I'm trying to add JNLP files to the WARs produced by the deploy target. I
> want the files to use a relative codebase so we can test them locally (and
> also for maintainability reasons). However, I am not having any luck getting
> this to work.
>
> I generate the JNLP files using the same token replacement approach we're
> using for the HTML files. Here's the JNLP template for the Kitchen Sink app:
>
>
> http://svn.apache.org/repos/asf/incubator/pivot/trunk/demos/www/kitchen_sink.template.jnlp
>
> I don't see anything obviously wrong with it, yet when I try to launch the
> generated JNLP file, I'm told that:
>
> "The field <jar>href has an invalid value:
> lib/pivot-core-1.3-incubating.jar,lib/pivot-core-1.3-incubating.jar"
>
> The lib directory does exist, as does the pivot-core-1.3-incubating.jar
> file.
>
> I don't have a lot of experience with JNLP, so maybe I'm doing something
> wrong. Does anyone have any suggestions?
>
> Thanks,
> Greg
>
>