On Wed, 8 Dec 1999, Vince Darley wrote:
> Does anyone have an idea why the following might happen:
Woah, what is that? "java::import -medical" is totally wrong.
You could do a "java::import -package medical Simulation" or
you could do a "java::import medical.Simulation". These two
commands would do exactly the same thing in this case.
The "java::import -package pkg cls ..." is really designed
to avoid having to re-enter the package name for a bunch
of classes that are in the same package. It should be used
like this:
% java::import -package java.util Hashtable Vector
You can also query the current imports with this command.
% java::import
If you just want to query the imports from a given package
(java.util in this case), use this form of the command.
% java::import -package java.util
> % catch {java::import -medical Simulation}
> 1
> % catch {java::import medical.Simulation}
> 1
> % java::new medical.Simulation
> java0x1
> %
That should work with no problems. Double check that this
is actually the name of the class by running
"javap medical.Simulation" from your system shell.
> (I want to import the class and then do 'java::new Simulation')
When things go wacky like this, I take a 10 minute break,
and start over. Oh yeah, reboot your NT box too:)
> The first line used to work ok, but has suddenly stopped working today, for
> no reason I can understand. This is with tclBlend1.2.5, Windows NT, JDK
> 1.2.2, Tcl 8.2.2... and the very same code (I've been making small changes,
> for sure...) worked ok yesterday.
>
> The error messages above from the 'catch' statements are the empty string
> "".
>
> thanks for any suggestions,
>
> Vince.
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]'.