Dear all,
  I'd be very grateful for any problems with this one!

  I'm running LinuxPPC (kernel 2.2.14 with glibc2.1.3) on a PowerMac
8600/250. I've installed, and have working, a Blackdown port of
JDK1.2.2.

  Compiling tclBlend (version 1.2.6 built on top of TCL/TK 8.3.2) and
running it (via jtclsh) is fine - no compile warnings or errors! The
demos all work fine. The tclblend tests fail, complaining about not
being able to find 'tcl.lang.NativeTestExtension'.

  However, I'm interested in testing Java code from a TCL script. As I
understand things (I may be wrong here?), if we launch jtclsh from the
directory containing our compiled Java code (assuming that '.' is
locatable on the relevant environment variables), we can then create
instances of classes within the compiled code via 'java::new <my
class>'.

  Now, if this is so, then I've definitely got a problem since the JVM
returns with the error:

    java.lang.IllegalAccessException <my class>

catching the Java exception object and printing out the trace stack
yields the following:

java.lang.IllegalAccessException: <my class>
 at java.lang.reflect.Constructor.newInstance(Native Method)
 at tcl.lang.reflect.PkgInvoker.invokeConstructor(PkgInvoker.java:95)
 at tcl.lang.JavaInvoke.call(JavaInvoke.java:252)
 at tcl.lang.JavaInvoke.newInstance(JavaInvoke.java:69)
 at tcl.lang.JavaNewCmd.cmdProc(JavaNewCmd.java:103)
 at tcl.lang.Interp.callCommand(Interp.java:953)
 at tcl.lang.Interp.eval(Native Method)
 at tcl.lang.Interp.eval(Interp.java:794)
 at tcl.lang.JavaTryCmd.cmdProc(JavaTryCmd.java:74)
 at tcl.lang.Interp.callCommand(Interp.java:953)

  Attacking the problem the other way (ie. open the class file, load it
into a string and then use java::defineclass etc. to manually load the
classes bytecode into the JVM) results in the same error message.

  So, which is it: a faulty understanding of how to manipulate Java from
TCL or do I have a bug in my build of tclBlend somewhere? Or is
something else up?

  Many thanks,

    Carl.

--
Dr. Carl Pulley (Lecturer)
School of Computing and Mathematics,
University of Huddersfield,             email: [EMAIL PROTECTED]
Huddersfield                            WWW: http://helios.hud.ac.uk/scomcjp





----------------------------------------------------------------
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