On Wed, 8 Dec 1999, Vince Darley wrote:

> Hope this stops someone else wasting a bunch of time.
> 
> My problem with 'java::import -package medical Simulation' not working when
> it seemed it should (and when it worked yesterday) turned out to be the
> following:
> 
> (i) my code, tclBlend, java etc were all 100% fine.
> (ii) I had a directory 'medical' full of my class files, BUT I also happened
> to have created a .zip file 'medical.zip' which also contained all those
> class files (just there temporarily to email to someone to run my software),
> and both the 'medical' directory and the medical.zip file were in [pwd].

I don't know what you mean by this. The java::import does try to load
a class with the given name to see if it exists, but it should not
go loading things out of zip files if they are not on the CLASSPATH.
If it is doing something strange like this, it might be a bug. Could
you try to come up with a small test case that generates the error
your were seeing? If you can get a nice little test case to generate
this error, I will find out what caused it and fix the problem.

> For whatever reason, the java::import -package medical looked first at the
> medical.zip file, and ignored the 'medical' directory and failed with an ""
> error.  I have no idea whether this should be considered correct behaviour,
> or whether tclBlend should have either (i) ignored the zip file and run my
> code properly, or (ii) actually used the zip file (which, after all,
> contained perfectly good .class files) and run properly.
> 
> The solution of course was to delete the zip file.
> 
> While I'm here, does anyone have any suggestions for:

Tricky. The most simple way to do this is to use Jacl. Jacl is 100%
Java and it should run your Tcl code. You can load Jacl into a jdb
and set breakpoints in the code. Debugging JNI code is a problem
all Java projects that use native code face, and I have not seen
a good solution yet.

> (i) best approach for debugging java code which is only called from Tcl.

I have no idea. I do not know if anyone has ever tried.

> (ii) can tclBlend/java be used in the tcl plugin (after special
> compilation?)?
> 
> cheers,
> 
> Vince.

----------------------------------------------------------------
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]'. 

Reply via email to