Tcl logo


Home
Getting-Started
Download
Mailing-Lists
Manual
FAQ
Links

i



Tcl/Java FAQ

Question Index


Questions and Answers

Which JDK versions are supported?
JDK versions 1.1, 1.2, 1.3, and 1.4 are known to work well with both Jacl and Tcl Blend. JDK 1.5 seems to work fine but more testing is needed before it can be considered stable. Some JDK implementations contain bugs that effect either Tcl Blend or Jacl.

Which Tcl versions are supported?
Tcl Blend works with Tcl 8.3 and Tcl 8.4. Tcl 8.4.2 or newer is required when building from source under Windows. Jacl is its own implementaiton of Tcl, so it does not depend on or interact with the C version of Tcl at all.

Where can I get help if I run into problems?
Don't panic! Help is just a couple of clicks away. There is a Tcl/Java users mailing list dedicated to helping end users with any problems they might encounter. A searchable archive of posts to the mailing list is available, so you can take a look at questions other users have posted. Before you can post your own questions, you will have to subscribe to the mailing list. One is required to subscribe before posting in order to keep spammers from abusing the list. It is easy to subscribe, unsubscribe, and view the archive at the
Mailing-Lists page.

Is Tk implemented in Jacl?
Jacl is an implementation of Tcl, not Tk. The
Swank project is a set of Java classes that wrap Java's swing widgets into Tk commands. Swank is very pre-alpha, and we need developers to jump in and help out.

How do I create an array of Java objects?
An array object is created with the java::new command. To create an int[5] array with values 11 through 15, you would enter:


         set arrayObj [java::new {int[]} 5 {11 12 99 14 15}]
         $arrayObj set 2 13
         
Note that in the above example the array type is passed with brackets around it. This is required because the square brace syntax is used to indicate a command substitution in Tcl, so passing int[] instead of {int[]} generates an error because Tcl interprets [] as the empty string and passes the string int to the java::new command.

How are 64 bit values handled?
Jacl does not support 64 bit values in Tcl scripts. Tcl 8.4 does support 64 bit values in regular Tcl commands in some configurations. Both Jacl and Tcl Blend support passing 64 bit values to Java methods that expect a long or java.lang.Long type. If a 64 bit value is returned by a Java method, it will be treated as a string.

Does Tcl Blend work with green threads on Solaris or Linux?
No, Tcl Blend requires a native threads JVM. Initially we intended to make Tcl Blend work with a green threads JVM, but there are just too many problems to justify supporting this configuration.

Is Tcl Blend stubs enabled?
No, Tcl's stubs mechanism does not work with Tcl Blend. As of version 1.3, Tcl Blend supports loading of both Tcl Blend and Tcl into an existing JVM. To implement this feature, the Tcl Blend shared library needs to know the specific version of Tcl it was compiled with. Tcl's stubs mechanism is designed to support loading an extension into multiple versions of Tcl without the need for a recompile.

Does Jacl or Tcl Blend work inside a web browser?
No. Running Jacl inside a web browser or Tcl Blend inside the Tcl plugin is not supported. There are far too many issues related to security and flaky Java implementations inside browsers to make this feasible. For example, both the Netscape and IE implementations of Java disallow introspection of Java classes, so commands in the java package would not work. It is just not worth the trouble of trying to support running things in a web browser.

Is there a Mac port?
No, there has historically been little or no interest expressed in running Jacl or Tcl Blend on the Mac. Some user have reported that Jacl works just fine on MacOSX.