Re: [tcljava-user] Suitability of Tcl Blend
Brought to you by:
mdejong
From: <pfi...@oz...> - 2009-08-28 14:30:13
|
<HTML> See this link which explains the concepts. <BR> <BR> http://www.ensta.fr/~diam/tcl/online/Using_Tcl_in_Java-20010106.html<BR> <BR> You want to load the C based TclBlend interpreter INTO Java which is different to using TclBlend on it's own.<BR> <BR> i.e. start a JAVA program and load TclBlend Vs start TclBlend then load JAVA via JNI using package require Java. <BR> <BR> <BR> <BR> <span style="font-weight: bold;">On Fri Aug 28 18:02 , Seamus McKenna <sea...@ho...> sent:<BR> <BR> </sea...@ho...></span><blockquote style="border-left: 2px solid rgb(245, 245, 245); margin-left: 5px; margin-right: 0px; padding-left: 5px; padding-right: 0px;"> <style> .hmmessage P { margin:0px; padding:0px } body.hmmessage { font-size: 10pt; font-family:Verdana } </style> <body class="hmmessage"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} pre {margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Courier New"; mso-fareast-font-family:"Times New Roman";} span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:Arial; mso-ascii-font-family:Arial; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:windowtext;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">Hi,<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">Just wondering if anyone can help..<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">I would like to know if TclBlend is right for me.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">We have a test framework in Java and would like to directly call legacy TCL scripts.<span style=""> </span>These scripts include packages like Expect so I am not sure that JACL is suitable. Thatâs why Iâm looking at TclBlend.<span style=""> </span>I see that itâs possible to call java directly from TCL using âpackage require javaâ e.g. java::import java.net.InetAddress.<span style=""> </span>But is it possible to carry out standard TCL commands from JAVA? <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></p> <pre><span style="font-family: Arial;">One thing I see is that I could use tcl.lang.evalFile to run a tcl script from java but I have a few queries.<o:p></o:p></span></pre><pre><span style="font-family: Arial;">a) Can I pass arguments to the script?<o:p></o:p></span></pre><pre><span style="font-family: Arial;">b) Can the Tcl script include Expect? <o:p></o:p></span></pre> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">If all else fails, I realise that I can call the tcl script directly as I would an executable from JAVA.<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">Any help/suggestions would be greatly appreciated. <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">Seamy<o:p></o:p></span></p> <BR> <hr>Windows Live Messenger: Thanks for 10 great yearsâenjoy free winks and emoticons. <a href="http://clk.atdmt.com/UKM/go/157562755/direct/01/" target="_blank">Get Them Now</a></meta></meta></meta></meta></body></blockquote></HTML> <BR> |