allelopath
asked on
Using jnlp on OS X
I'm trying to test jnlp locally on OS X.
In a directory I have an html file, a jnlp file, and a jar file.
The jnlp file cannot find the jar file.
I've tried codebase=".", but this doesn't work:
BadFieldException[ The field <jnlp>codebase has an invalid value: .,.]
The machine's local ip address is 192.168.0.6
codebase="http://192.168.0.6" href="Users/apple/Document s/ccs.jnlp
That gives this error: com.sun.deploy.net.FailedD ownloadExc eption: Unable to load resource: http://192.168.0.6/Users/apple/Documents/ccs.jnlp
May there is something required before the "Users" directory in that path?
How can I get this to work?
In a directory I have an html file, a jnlp file, and a jar file.
The jnlp file cannot find the jar file.
I've tried codebase=".", but this doesn't work:
BadFieldException[ The field <jnlp>codebase has an invalid value: .,.]
The machine's local ip address is 192.168.0.6
codebase="http://192.168.0.6" href="Users/apple/Document
That gives this error: com.sun.deploy.net.FailedD
May there is something required before the "Users" directory in that path?
How can I get this to work?
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="." href="ccs.jnlp">
<information>
<title>Some TItle</title>
<vendor> - Some Vendor</vendor>
<homepage href="http://www.somewhere.edu/home.html" />
<offline-allowed />
</information>
<resources>
<j2se version="1.5+" />
<jar href="ccs.jar" />
</resources>
<application-desc main-class="ccs.MyApplication" />
</jnlp>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's a good idea. Unfortunately doesn't seem to work yet. but I thinks its closer.
I think 3 slashes is correct because the html file that links to the jnlp file is in the same directory and appears in the browser as:
file:///Users/apple/Docume nts/ccs.ht ml
The line in ccs.jnlp now looks like this:
This is the error I get now:
BadFieldException[ The field <jnlp>href has an invalid value: ccs.jnlp,ccs.jnlp]
at com.sun.javaws.jnl.XMLUtil s.getAttri buteURL(XM LUtils.jav a:102)
at com.sun.javaws.jnl.XMLForm at.parse(X MLFormat.j ava:139) ...
I also tried:
I think 3 slashes is correct because the html file that links to the jnlp file is in the same directory and appears in the browser as:
file:///Users/apple/Docume
The line in ccs.jnlp now looks like this:
<jnlp spec="1.0+" codebase="file:///Users/apple/Documents" href="ccs.jnlp">
This is the error I get now:
BadFieldException[ The field <jnlp>href has an invalid value: ccs.jnlp,ccs.jnlp]
at com.sun.javaws.jnl.XMLUtil
at com.sun.javaws.jnl.XMLForm
I also tried:
href="/ccs.jnlp"
It is strange, and why would it write it twice in the error message : ccs.jnlp,ccs.jnlp
And in all examples I see the same statement - I believe you do have this file ccs.jnlp
in Users/apple/Documents. Check all syntax for mistprints, say , ccs or maybe css
And in all examples I see the same statement - I believe you do have this file ccs.jnlp
in Users/apple/Documents. Check all syntax for mistprints, say , ccs or maybe css
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Well, certainly try to add the slash, though I thought about it, but checked that in many examples they show it without the last slash in the codebase. Maybe, for Mac OS, there may be some quirk, though. Worth trying.
ASKER
I had already tried the slash, even though, as for_yan says, the examples don't show that.
Anyway, it doesn't help.
I guess I'm giving up on this at least for now.
Anyway, it doesn't help.
I guess I'm giving up on this at least for now.
file: should work without such process, but I'm not sure how file: will look on Mac,
the absolute path should work - on windos it would be, say, "file:///C:\..."
On Mac it shoul probably be like on Unix, so maybe you need even three slashes,
like file:///Users/... - try both ways- file://Users and also with three slashes