
Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
>>I wrote the following program for reading files from a jsp page on my
>>local drive, now when I try to read a file on a mapped drive, the
>>mydirectory.exists() returns false.
...
>>Is using a signed applet the only solution?
>
> You could use JAWS, an applet, a signed Applet, but an unsigned Applet
> cannot read the local file system.
Note that *any* JWS applet *or* application would need to be
signed for this. Unsigned applications gain a very 'applet like'
sandbox when deployed using Webstart.
> see http://mindprod.com/jgloss/javawebstart.html
This page consistenly uses the word 'applications', which
might lead a reader to believe that applets *cannot* be deployed
using webstart [..and yes, I also disagree with your 'two words'
comment, (shrugs) Sun apparently changed, it seems that now
'Webstart' or 'WebStart' is prominent..].
Mind you, I have never seen a good term that describes
'Java applications and applets', and an applet might fit
the wider meaning of the term 'application'.
Could you change the page to point out that JWS *can* also
be used with applets? [ You might also mention that as soon
as developers see what applets lose when deployed by JWS
(resizeable window, interaction with other applets or JS..),
they will quickly abandon it in disgust, but that is
another matter. ]
Roedy Green - 11 Oct 2005 23:18 GMT
>Could you change the page to point out that JWS *can* also
>be used with applets?
I have never seen a JAWS Applet and I can't see how they could be
deployed. I could see what I call a hybrid, but not something without
a main method. Applets are controlled by having their init, start,
stop and destroy methods called for them. They run inside html in web
pages. None of this has anything to do with JAWS.
Are you just talking about using JAWS to deliver a local jar
containing an Applet? but even then the jar has no easy to find
address a webpage could use.
Where did you hear about this?

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Andrew Thompson - 12 Oct 2005 02:43 GMT
>>Could you change the page to point out that JWS *can* also
>>be used with applets?
>
> I have never seen a JAWS Applet and I can't see how they could be
> deployed.
If a picture paints a thousand words, how many
does a demo paint?
<http://www.physci.org/codes/jws/demo.jsp>
[ Hopefully this page stands as it is for someone that
has not read this thread, if there is anything in the
page that is not 'inuitively obvious', please let me know. ]
Roedy Green - 12 Oct 2005 04:32 GMT
>If a picture paints a thousand words, how many
>does a demo paint?
><http://www.physci.org/codes/jws/demo.jsp>
the interesting thing was this in the JNLP file:
<applet-desc
documentBase="http://www.physci.org/pc/property.jsp"
name="propertiesapplet"
main-class="PropertiesApplet"
width="500"
height="400">
<applet-desc>
So JAWS is not just treating it as an application. I noticed this
Applet runs outside a browser.
When did that tag come in?
Have you checked to see just how clever the appletviewer is? Does it
know how to deal with showDocument?

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Andrew Thompson - 12 Oct 2005 04:48 GMT
..
>><http://www.physci.org/codes/jws/demo.jsp>
>
> the interesting thing was this in the JNLP file:
>
> <applet-desc
...
> So JAWS is not just treating it as an application. I noticed this
> Applet runs outside a browser.
Yep. That (in my arrogant opinion) is what then
makes it all rather silly. Applets can gain some
advantages over applications by leveraging the power
of the browser itself (whichever browser it is).
JWS applets lose that.
> When did that tag come in?
I have seen it in the 1.4 JWS docs, not sure about earlier..
> Have you checked to see just how clever the appletviewer is?
Yep. (and, like you seem to be, I am assuming the
AppletViewer is used for JWS applets.)
>..Does it know how to deal with showDocument?
Nope. showDocument() is ignored silently by the AppletViewer.
[ Or at least, it did when I checked it last year - I
was developing an applet viewer where I use BrowserLauncher
to emulate 'showDocument' - kludgily - ignoring named windows. ]
But then, that is 'allowable' according tho the JavaDocs, as the
(non-browser) applet container is free to ignore 'showDocument()'.
<http://java.sun.com/j2se/1.5.0/docs/api/java/applet/AppletContext.html#showDocum
ent(java.net.URL)>
"This method may be ignored by applet contexts that are not browsers."
Experience has shown that showDocument() is now being
ignored/suppressed by any variety of pop-up blockers
or browser upgrade patches. The only reliable way to
get something to appear 'over' an applet is to
a) put the content inside a Java (J)Window/(J)Frame/(J)Dialog.
b) sign the applet and use 'BrowserLauncher' to get
a new browser window.