[Tcl Java] Re: [Tcl Java] Re: [Tcl Java] Jacl in applet
Hello! I've still problem to run jacl in applet. I tried to run jacl in signed applet in NN with plugin1.1.3 but it looks like I can't signed it :) But what is more interesting is that I just can't use jacl in appletviewer! I think appletviewer use my localy installed java (I use 1.1.8). If I try to use my script in Frame it works fine, but in applet it throws this exception: tcl.lang.TclException: unknown class "Applety.SignedApplet" at tcl.lang.JavaInvoke.getClassByName(JavaInvoke.java:623) at tcl.lang.ClassRep.get(ClassRep.java:109) at tcl.lang.JavaInvoke.callStaticMethod(JavaInvoke.java:159) at tcl.lang.JavaCallCmd.cmdProc(JavaCallCmd.java:74) at tcl.lang.AutoloadStub.cmdProc(Extension.java:144) at tcl.lang.Parser.evalObjv(Parser.java:740) at tcl.lang.Parser.eval2(Parser.java:1138) at tcl.lang.Parser.evalToken(Parser.java:930) at tcl.lang.Parser.eval2(Parser.java:1125) at tcl.lang.Parser.eval(Parser.java:1780) . . I attached codes and my jar if you want to try it. Sorry for long uploading. Lubos V. Title: Signed Applet Applety.jar
[Tcl Java] Re: [Tcl Java] Jacl in applet
That is an easy one. Run these commands to check out tcljava from the cvs. % setenv CVSROOT :pserver:[EMAIL PROTECTED]:/cvsroot % cvs login (password is cvs) % cvs checkout tcljava This will create a tcljava directory with all the src code in it. Copy your modified files into the tcljava/src/tcljava/tcl/lang or whatever sub dir they live in. Then just run this command from the main tcljava directory to get a diff of your changes. cvs diff > applet.patch It is just that easy! Mo Dejong Red Hat Inc. On Mon, 17 Jan 2000, Thomas McKay wrote: > Sorry, I'm a little pressed for time at the moment and honestly don't know > if I still have the original to diff against. > > The problem boiled down to a security exception. The class Class is in a > jar file that did not have the proper policy set. By using getClass(), the > result would be from the Jacl jar file which had the proper policy. > 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
[Tcl Java] Re: [Tcl Java] Jacl in applet
Sorry, I'm a little pressed for time at the moment and honestly don't know if I still have the original to diff against. The problem boiled down to a security exception. The class Class is in a jar file that did not have the proper policy set. By using getClass(), the result would be from the Jacl jar file which had the proper policy. > -Original Message- > From: Mo DeJong [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 17, 2000 1:29 PM > To: [EMAIL PROTECTED] > Subject: [Tcl Java] Re: [Tcl Java] Re: [Tcl Java] Jacl in applet > > > What was the problem you were running into? Would the applet fail to run > without the patch you suggest? Could you post a diff -u style patch > for the change you suggest? > > Mo Dejong > Red Hat Inc. > > On Mon, 17 Jan 2000, Thomas McKay wrote: > > ... > > > + Changed Class.class.getResourceAsStream() in Interp.java to > > getClass().getResourceAsStream(). > > > > So, it's definitely possible. > > > 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
[Tcl Java] Re: [Tcl Java] Re: [Tcl Java] Jacl in applet
What was the problem you were running into? Would the applet fail to run without the patch you suggest? Could you post a diff -u style patch for the change you suggest? Mo Dejong Red Hat Inc. On Mon, 17 Jan 2000, Thomas McKay wrote: ... > + Changed Class.class.getResourceAsStream() in Interp.java to > getClass().getResourceAsStream(). > > So, it's definitely possible. 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
[Tcl Java] Re: [Tcl Java] Jacl in applet
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
[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
[Tcl Java] Re: [Tcl Java] Jacl in applet
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? You can run Jacl applets that only use Tcl commands. You might want to check out these pages on Christopher Hylands site, they are a little dated but have some great info. http://ptolemy.eecs.berkeley.edu/~cxh/java/tclblend/ http://ptolemy.eecs.berkeley.edu/~cxh/java/jaclapplet/index.html > Is there some workaround? > I'm looking especially for support IE and NN. > Does older Jacl work in applet? You should be using Jacl 1.2.5. There will be a new 1.2.6 release in the next couple of weeks. There is no reason to wait for the new release unless you need one of the bug fixes in it. > Which is the newest one? > > A lot of questions and no answer, > thanks for any help. > > Lubos Vrba Mo DeJong Cygnus Solutions 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