Hello all, I am new to this. When I try to access the "example.jnlp" by
clicking on the relevant href I get the error message "unable to load
resource file example.jar". I suspect this has something to do with
permissions. I have done nothing about "signing" any files. Any suggestions
gratefully received.
Ivan
> ..When I try to access the "example.jnlp" by
> clicking on the relevant href ..
Do you specifically mean the link is
coming from a web page? Web start projects
can be started and tested from the command
line, directly off the local file system
(which I highly recommend, as it saves the
trouble of uploading a new copy for every test).
>..I get the error message "unable to load
> resource file example.jar".
Is that message copy/pasted? Something sounds
slightly odd with it.
>..I suspect this has something to do with
> permissions.
I don't think so. Security problems are
generally long and verbose, and include
the word 'security' in some prominent form.
It is much more likely that the comnination
of codebase and relative path does not point
to where the 'example.jar' actually resides.
That makes the message quite logical - if
web start is not able to *find* the resource,
it will be 'unable to load' it.
> ..I have done nothing about "signing" any files.
(I suggest) forget that for the moment, we
can deal with code permissions/trust later,
if needed.
>..Any suggestions gratefully received.
Is your JNLP file private/confidenial? Can
you show it to us, or better, link to a publicly
available version?
If 'yes it is private', can you create a version
that is *not* private and shows the same behaviour,
and post the entire JNLP file here?
(Note that it is quite common for folks to
make a 'confidential' JNLP 'non-confidential'
by changing the codebase, but I am hoping we
can avoid that, as it complicates figuring
where web start is looking for the files.)
Andrew T.
ivan danicic - 21 Mar 2007 20:03 GMT
>> ..When I try to access the "example.jnlp" by
>> clicking on the relevant href ..
[quoted text clipped - 42 lines]
> that is *not* private and shows the same behaviour,
> and post the entire JNLP file here?
snip
> Andrew T.
Hello, the "unable to load.." has been cured by having an absolute rather
than relative link in the jnlp file. Now the error is "missing field from
launch file <jnlp>(<application-dec|...)". I can see nothing missing,I
enclose this file as an attachment.
Ivan
Andrew Thompson - 21 Mar 2007 22:20 GMT
..
> Hello, the "unable to load.." has been cured by having an absolute rather
> than relative link in the jnlp file. Now the error is "missing field from
> launch file <jnlp>(<application-dec|...)".
I can see a few problems with it..
>..I can see nothing missing,I
> enclose this file as an attachment.
Please don't 'attach' files. This group was
not defined as accepting attachments or binaries,
and well behaving servers (apparently GG is not)
will strip them automatically.
To your JNLP..
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase=file:///home/ivie/proggies/opengl/jogl/examples>
<href="example.jnlp">
'href' should be part of the same element (between
the '<','>' of the previous element, to write it over
two lines..
<jnlp codebase="file:///home/ivie/proggies/opengl/jogl/examples"
href="example.jnlp">
(Also, all attributes should be enclosed in quotes,
either single or double quotes should do, but for
simpliciaty, keep it consistent.)
<information>
<title>Abra-cadabra</title>
<vendor>IVAN </vendor>
<offline-allowed/>
</information>
<security>
<!__<all-permissions/>-->
!__ is not a valid 'start of comment', it is
!-- that starts comments - this is *probably*
the source of the current problem (as soon as the
XML parser becomes confused, all bets are off
as to it working, or giving good error messages.
</security>
<resources>
<j2se version="1.5+"/>
<jar href="/home/ivie/proggies/opengl/jogl/example.jar" main="true"/
</resources>
<application-desc
<main-class="texture2"/>
Again, these two lines should be a single element,
since we can 'self close it' I recommend replacing those
two lines..
</application-desc>
..as well as this one, with the two lines..
<application-desc
main-class="texture2"/>
</jnlp>
HTH
Andrew T.
Andrew Thompson - 22 Mar 2007 05:26 GMT
On closer inspection, I noticed a couple of things
about the paths. I suspect, (but am *not* absolutely
certain) that the paths will not be acting in the
way you seem to be expecting them to behave.
> <jnlp codebase=file:///home/ivie/proggies/opengl/jogl/examples>
The codebase is an important aspect of any
JNLP file, *everything* else should be paths
relative to the codebase. Note the codebase
finally points to/ends at the directory
'examples'.
> <href="example.jnlp">
So this file would be expected to be here..
file:///home/ivie/proggies/opengl/jogl/examples/example.jnlp
I guess that is where the example.jnlp is located,
so we are good so far, but..
> <jar href="/home/ivie/proggies/opengl/jogl/example.jar" main="true"/>
This line actually is telling web start
to look for that jar as path relative to
the root of the *codebase*, rather than any
local file system (this is my understanding).
So I think it is expecting the jar archive to
be located here..
file:///home/ivie/proggies/opengl/jogl/examples/home/ivie/proggies/opengl/jogl/example.jar
..whereas that archive is really..
file:///home/ivie/proggies/opengl/jogl/example.jar
..here. Right?
In that case, I would recommend altering the
paths in one of either two ways..
1)
<jnlp
codebase="file:///home/ivie/proggies/opengl/jogl/"
href="examples/example.jnlp">
...
<jar
href="example.jar"
main="true" />
2)
<jnlp
codebase="file:///home/ivie/proggies/opengl/jogl/examples/"
href="example.jnlp">
<jar
href="../example.jar"
main="true" />
After making the other changes mentioned, try
changing the paths in one (or both) those ways
and see if that helps.
If we can get that sorted, I would like to
go into removing the file system based path.
Most web start projects are deployed from
the web, and testing off the local file
system can be done by overriding the
web based codebase (to use the the version
off the local file system) when you invoke
it in web start.
Andrew T.
ivan danicic - 22 Mar 2007 19:07 GMT
> On closer inspection, I noticed a couple of things
> about the paths. I suspect, (but am *not* absolutely
[quoted text clipped - 71 lines]
>
> Andrew T.
Hello, I sent this by e-mail by mistake:
Hello Andrew, I had already spotted the paths mistake of having omitted the
directory "examples". After mending that and making the alterations which
you suggested before, the thing ran as far as "java loading" and sometimes
even as far as "starting application"! Nothing further. I'd like to do what
you say about
removing the file system paths but I don't know how; also would it be better
to do that later when with the present setup the thing actually runs? Many
thanks for your kind interest and help.
Ivan
Andrew Thompson - 23 Mar 2007 04:15 GMT
..
> Hello Andrew,
Hi - could you refrain form 'full-quoting'?
Please put comments directly after whatever
you are commenting on, then trim any other text
no longer relevant.
>..the thing ran as far as "java loading" and sometimes
> even as far as "starting application"! Nothing further.
Is the console configured to automatically start
for web start applications? It should be giving
a lot more detailed information. Check the Java
Control Panel - the 'Java Console' setting under
the 'Advanced' tab.
>..I'd like to do what
> you say about
> removing the file system paths but I don't know how; also would it be better
> to do that later when with the present setup the thing actually runs?
Do you run Ant? I have a variety of entirely
self-contained web start examples that make this
a lot easier to explain if you can get the ant
project's build.xml on-screen.
Andrew T.
ivan danicic - 23 Mar 2007 18:31 GMT
> ..
snip
>> Is the console configured to automatically start
> for web start applications? It should be giving
> a lot more detailed information. Check the Java
> Control Panel - the 'Java Console' setting under
> the 'Advanced' tab.
Hello, It seems to be so configured; it runs web start progs without
problems. Java console seems to work only with applets..
>>..> Do you run Ant? I have a variety of entirely
> self-contained web start examples that make this
> a lot easier to explain if you can get the ant
> project's build.xml on-screen.
>
> Andrew T.
I know nothing about Ant but I shall look into it. Thanks
Ivan
ivan danicic - 24 Mar 2007 23:56 GMT
>>>..I'd like to do what
>> you say about
[quoted text clipped - 8 lines]
>
> Andrew T.
Hello, I have now got ant, but of course I know not how to use it yet. Maybe
your examples might help.
Ivan