Actually, you can use Jacl in an applet; at least in Netscape.  By using the
Java 2 plug-in there is a finer-grained security mechanism called
"policies."  By setting the correct policies, an applet can get permission
to read files from jars (such as init.tcl) and examine classes (like using
java::*).

Now, I have no idea how to automagically set these policies during applet
install, etc.

Oh, I did have to make one tweak to Jacl in order to source files from a
jar.  From my  notes...

+ Changed Class.class.getResourceAsStream() in Interp.java to
getClass().getResourceAsStream().

So, it's definitely possible.

> -----Original Message-----
> From: Lubos Vrba [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 17, 2000 10:55 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [Tcl Java] Re: [Tcl Java] Re: [Tcl Java] Jacl in applet
>
>
> Mo DeJong wrote:
>
> > On Thu, 6 Jan 2000, Lubos Vrba wrote:
> >
> > > Hello *,
> >
> > This is a tricky issue. Jacl (using Tcl commands in an applet)
> > works but the java::* commands do not.
> >
> > > in jacl web pages I've read that Jacl 1.25 won't work in browsers.
> >
> > There is nothing wrong with Jacl that we could fix to "support"
> > applets. The "problem" is that the JVM inside Netscape's browser
> > is totally busted. I have not tested the Microsoft JVM so I
> > can not speak about that.
> >
> > > Is there some plans for future to support Jacl in applet?
> >
> >
> > > thanks for any help.
> > >
> > > Lubos Vrba
> >
> > Mo DeJong
> > Cygnus Solutions
>
> Thanks for answer. I'm still trying to find some workaround.
> In FAQ is written:
>
> 1.For remote applets, both Netscape and IE disallow the
> introspection of class
> members. This makes it impossible to use any of the following commands:
> java::new, java::call, java::prop, java::field.
>
> 2.You can install Jacl as a local Java package on your machine to
> get around the
>
> restriction mentioned in (a), but then Netscape won't read any of the Jacl
> library
> scripts, such as init.tcl, because it doesn't allow your applet
> to read from
> local
> disks.
>
> Can anybody say to me what does it mean 'install Jacl as a local
> Java package'?
> If it means place it in CLASSPATH, than I sign it and enable
> access to read
> sources will
> everything work?
> I just don't understand how this can get around using NN JVM..
> Am I wrong?
>
> Lubos
>
> ----------------------------------------------------------------
> The TclJava mailing list is sponsored by Scriptics Corporation.
> To subscribe:    send mail to [EMAIL PROTECTED]
>                  with the word SUBSCRIBE as the subject.
> To unsubscribe:  send mail to [EMAIL PROTECTED]
>                  with the word UNSUBSCRIBE as the subject.
> To send to the list, send email to '[EMAIL PROTECTED]'.
> An archive is available at
> http://www.mail-archive.com/tcljava@scriptics.com
>

----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe:    send mail to [EMAIL PROTECTED]  
                 with the word SUBSCRIBE as the subject.
To unsubscribe:  send mail to [EMAIL PROTECTED] 
                 with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'. 
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com

Reply via email to