I'd like to see a kind of 'java::unknown' facility, in which if the class loader can't find a class, it calls 'java::unknown {className}', which by default returns null, but can try to find the class itself (from Tcl/Jacl) and if it finds it returns the binary data which represents the class.
I definitely think it would be good to remove the 'feature' you mention below, since it tripped me up very unexpectedly. I don't see a need for adding env(TCL_JARPATH)... The user/the code should add any needed .jar/.zip files direct to the classpath/tcl_classpath.
just my 2c...
Vince.
> From: Mo DeJong [mailto:[EMAIL PROTECTED]]
>
> Both Jacl and Tcl Blend already use a class loader called
> TclClassLoader.
> Is there a feature that you would like to add added to the
> TclClassLoader
> or are you looking to bypass it completely? I do not really
> see anything
> wrong with adding something to the TclClassLoader or replacing it
> completely with something better. I really do not like the
> current design
> because as a programmer, you need to use the TclClassLoader
> explicitly,
> when this type of thing really should be done behind the scenes. I was
> also planning on stripping out the "feature" of the Tcl Class
> Loader that
> automatically looks inside .jar and .zip files that appear on the
> env(TCL_CLASSPATH). This makes the "worst case" lookup time depend on
> the number of .zip or .jar files on the file system, which is really
> ugly. Perhaps we should add a env(TCL_JARPATH) var instead?
>
> Mo Dejong
> Red Hat Inc.
>
> On Thu, 2 Mar 2000, Vladimir Zamiatin wrote:
>
> > Hello!
> >
> > I'm using JACL in web environment. I wrote engine
> > similar to JSP, which allows to embed Tcl scripts
> > in HTML pages. I want to make use of an
> > advanced classloader, provided by servlet runner
> > which has possibility to check for modification
> > of class or source java files in web-applications,
> > and recompile/reload them on-the-fly.
> >
> > I suppose one essential feature is missing in JACL:
> > an ability to use external class loader in interp.
> > It would be an easy change to add this feature to
> > JACL:
> >
> > Interp.setClassLoader(ClassLoader loader);
> > Interp.getClassLoader();
> >
> > And TclClassLoader can use this loader (if
> > present in Interp) to load classes. For
> > performance reasons it would be great if
> > this external loader has priority upon standard
> > class loading mechanisms.
> >
> > I beleive that this feature will improve
> > JACL ability to be embeded into different
> > applications and environments.
> >
> > Best regards,
> > Vladimir.
>
>
> ----------------------------------------------------------------
> 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