Rory McGrath wrote:
> Iam trying to get TclBlend to open a simple java class.
> The java code is as follows:
>
> package p;
> public class c
> {
>
> public c(String s)
> {
> contents = s;
> }
> public String toString()
> {
> return contents;
> }
> public String contents = "default value";
>
> }
>
> and the tcl code is:
>
> set env(CLASSPATH) [file join H: TCL_TEST myJar add newJAR.jar]
> puts $env(CLASSPATH)
> file exists $env(CLASSPATH)
> package require java
> set x [java::new p.c]
>
> After i run the "set x [java::new p.c]" i get a Fatal Error:
>
> Fatal Error in Wish
> JavaCmdProc : Interp.callCommand() raised an Exception
Humm, I don't think this is a problem with the Java class you created.
Most every problem people run into
is related to the CLASSPATH, this is likely one too. Could you try
setting the CLASSPATH with the
platform separator char, in Windows this is a \ between directory
elements. You can do that by putting
a [file nativename $path] call around your file join call.
hope that helps
Mo DeJong
|