aspose file tools*
The moose likes Other Languages and the fly likes JACL 1.4 - Now OO Enabled. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "JACL 1.4 - Now OO Enabled. " Watch "JACL 1.4 - Now OO Enabled. " New topic
Author

JACL 1.4 - Now OO Enabled.

Patrick Finnegan
Ranch Hand

Joined: Mar 05, 2002
Posts: 179
JACL 1.4 is now OO enabled.

http://sourceforge.net/projects/tcljava/

Tcl/Java 1.4 includes a number of exciting new features that make integrating Tcl and Java even easier.

Itcl Extension
**************

Jacl 1.4 now includes support for the Itcl OO extension. A Jacl user would execute the following to load Itcl commands into Jacl:

package require Itcl
This extension was implemented for Jacl by porting the Itcl 3.3 C source code to Java.

http://www.amazon.com/incr-tcl-tk-Ground-Up/dp/0072121068/ref=sr_1_2/002-2592624-2217661?ie=UTF8&s=books&qid=1175617503&sr=1-2

TJC Compiler
************

The TJC compiler is by far the most significant new development in the Jacl 1.4 release. The TJC compiler is used to convert a Tcl proc to Java bytecode that is then executed directly inside the JVM. In most cases, a TJC compiled proc will execute 10 to 20 times faster than an interpreted proc. Jacl's implementation has also been significantly optimized to support efficient execution of TJC compiled procs. In some cases, TJC compiled procs actually execute more quickly than procs compiled with the built-in compiler included in native Tcl. The TJC compiler can be used either at runtime or in batch mode.

Parser Extension
****************

Jacl 1.4 now includes support for the TclPro's Tcl parser extension. A Jacl user would execute the following to load Parser commands into Jacl:

package require parser
The parser extension version 1.4 was implemented for Jacl by porting the C source code to Java.

expr command
************

Jacl's expr implementation now supports the 'eq' and 'ne' string equality operators.

java::for command
******************

The java package includes a new java::for command. This command provides a mapping to Java's enhanced for loop statement and provides a simplified way to loop over the elements of a Collection or array object. See the documentation for usage examples.

Inner Classes
*************

Inner classes are now fully supported in the Java package. In earlier versions of Tcl/Java, an inner class like java.util.Map.Entry would be indicated by a string like java.util.Map\$Entry. This usage worked in some cases, but it was ugly and did not support imported class names via java::import. The new implementation makes it possible to pass java.util.Map.Entry or import java.util.Map and then pass Map.Entry to any of the java::* commands.

Classloader Implementation
**************************

The TclClassLoader used in Jacl and Tcl Blend to load Java classes and resources has been updated to make use of the class loader delagation model introduced in JDK 1.2. Loading of classes and resources is now be delagated to the thread context class loader. This change fixes class and resource loading problems found in Java app server environments like WebSphere, Tomcat, and others. A number of bugs related to loading classes from the env(TCL_CLASSPATH) path have been fixed and support for loading resources from the env(TCL_CLASSPATH) path has been added.

SetInterrupt API for Jacl
**************************

A new Interp.setInterrupt() API makes it possible for the user to interrupt a running Jacl interpreter and unwind the stack. For example, this API could be used to implement a service thread that would timeout and cleanup after a certain amount of time. See SetInterrupted for more info.

JPDA debug support
******************

Jacl can now be started in a debug mode that makes it easy to attach a Java debugger. A Java debugger that supports JPDA will automatically load and display the source code that implements Jacl. To start Jacl in debug mode, simply set the JACL_DEBUG env variable to "1" before running jaclsh or jaclsh.bat. Info about how to attach to the shell will be printed to the console.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64
Glad to see that JACL/TCLBlend is still being improved. The version 1.4 binaries on SF are all from August 2006; is that the version you're talking about, or do I need to get the sources and build it myself to use the new features?


Ping & DNS - my free Android networking tools app
Patrick Finnegan
Ranch Hand

Joined: Mar 05, 2002
Posts: 179
Yes. The jacl 1.4 binary is available from Sourceforge.

The TclBlend binary is still been tested and is only available for Windows. You can get it from www.patrickfinnegan.com.

TclBlend needs to be compiled on all other platforms.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64
Ah, so this is really just a re-announcement of the release from last August.
Patrick Finnegan
Ranch Hand

Joined: Mar 05, 2002
Posts: 179
Yes, except for the Blend Windows binary.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JACL 1.4 - Now OO Enabled.