http://sf.net/projects/tcljava/ is the home for [TclBlend] as well as Jacl. Jacl is an alternate implementation of Tcl, this time written entirely in Java. ---- According to this InfoWorld article[http://www.infoworld.com/article/03/06/12/HNsunscripting_1.html], Sun is thinking of introducing scripting to Java. Shouldn't they be encourages to do this with Tcl? - ''[escargo] 12 Jun 2003'' ---- See http://www.tcl.tk/man/java1.2.6/TclJava/contents.html for online documentations. There is a mailing list at the web site which provides support for Jacl [mailto:tcljava-user@lists.sourceforge.net]. ---- As of September 2001, [Neil Madden] has what he calls a rudimentary implementation of [socket]. ---- Several Jacl-oriented stories have been published through the years, including "Extending [XML] tools with Jacl scripts" [http://www-106.ibm.com/developerworks/library/x-xjacl/?open&43,t=gr]. Also, recently mentioned on the mailing list was these articles: http://www.projectgalileo.org.uk/audela/quiveu7_en.htm (see "Tcl + Java = A match made for scripting" ), as well as http://www.javaworld.com/javaworld/jw-03-2001/jw-0323-tcl.html , http://www.javaworld.com/javaworld/jw-03-2000/jw-03-beans.html , http://www.javaworld.com/javaworld/jw-10-1999/jw-10-script.html , and http://javasim.cs.uiuc.edu/ref.script/tcljacl.htm . ---- [CL] occasionally updates a page [http://phaseit.net/claird/comp.lang.java/jacl.html] of information related to Jacl. ---- [Swank] is an interesting extension to Jacl. ---- [Neil Madden] writes, "To try out Jacl, make sure jacl.jar is in your classpath (it should be from what you say), and then open a command line and type: java tcl.lang.Shell after a second or so you should see the familiar % Tcl prompt and you can fire away. If you want to extend your Java application using Jacl, then just import tcl.lang.* and look at the docs which come with Jacl for some pointers at how to use the APIs." ---- [Martin Lemburg] I'm experimenting the first time with Jacl and have following problem. I evaluate a tcl script inside the Jacl interpreter and the result is following: {"" "platform information:" {os {Windows 2000}} ...} I want to test if an object inside the list is a list or something else by this: 1 TclObject result, element; 2 TclList list, subList; 3 ReflectObject reflectObj; 4 5 result = ip.getResult(); 6 element = null; 7 list = (TclList) result.getInternalRep(); 8 subList = null; 9 reflectObj = null; 10 11 for ( int idx = 0 ; idx < list.getLength( ip, result ) ; ++idx ) 12 { 13 element = list.index( ip, result, idx ); 14 reflectObj = (ReflectObject) element.getInternalRep(); 15 16 if ( reflectObj.getClass == TclList.class ) 17 { 18 // ... use as list ... 19 } 20 else 21 { 22 // ... use as "not" list ... 23 } 24 } When casting from the internal representation of the first element of the list - here an empty string - to the ReflectObject type (in line 14) I get the exception "java.lang.ClassCastException" (detailMessage: "tcl.lang.TclString") So I experimented a bit and I tried just to get the ReflectObject of the internal representation of the interpreter result and I got the same exception "java.lang.ClassCastException", but with the detailMessage: "tcl.lang.TclList". I used the verbose option of javac ... javac loaded the class tcl.lang.ReflectObject. I used the verbose option of java ... java didn't loaded the class tcl.lang.ReflectObject. So what can I do? What goes wrong? Thanks for any hints, suggestions! Best regards Martin Lemburg ---- [Martin Lemburg] again ... I found the errors, many errors. Here my "new" and working version: 1 TclObject result, element; 2 3 result = ip.getResult(); 4 element = null; 5 6 for ( int idx = 0 ; idx < TclList.getLength( ip, result ) ; ++idx ) 7 { 8 element = TclList.index( ip, result, idx ); 9 10 if ( (element.getInternalRep()).getClass() == TclList.class ) 11 { 12 // ... use as list ... 13 } 14 else 15 { 16 // ... use as "not" list ... 17 } 18 } ---- See also [Java]. ---- At http://www.javaworld.com/javaworld/jw-04-2002/jw-0405-scripts_p.html is an article comparing Jacl with several other scripting environments for Java. ---- ''[escargo] 11 Apr 2003'' - Has anyone tried building or running Jacl in Eclipse? ---- Has anyone figured out a way for Jacl apps to communicate with tcl/tk apps via a [send] like mechanism? ---- See also, [SQLServlet]. ---- [Category Language] | [Category Java]