tcljava-user Mailing List for Tcl/Java (Page 47)
Brought to you by:
mdejong
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(23) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(12) |
Feb
(10) |
Mar
(16) |
Apr
(10) |
May
(40) |
Jun
(13) |
Jul
(18) |
Aug
(4) |
Sep
(6) |
Oct
(3) |
Nov
|
Dec
(3) |
2002 |
Jan
(15) |
Feb
(19) |
Mar
(1) |
Apr
(11) |
May
(12) |
Jun
(10) |
Jul
(2) |
Aug
(22) |
Sep
|
Oct
(3) |
Nov
(9) |
Dec
(20) |
2003 |
Jan
(32) |
Feb
(5) |
Mar
(26) |
Apr
(30) |
May
(10) |
Jun
(8) |
Jul
(17) |
Aug
(7) |
Sep
(24) |
Oct
(7) |
Nov
(6) |
Dec
|
2004 |
Jan
(5) |
Feb
|
Mar
|
Apr
(7) |
May
(8) |
Jun
(12) |
Jul
(3) |
Aug
(11) |
Sep
(8) |
Oct
(4) |
Nov
(2) |
Dec
(6) |
2005 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(19) |
Jul
(8) |
Aug
(22) |
Sep
(12) |
Oct
(35) |
Nov
(12) |
Dec
(4) |
2006 |
Jan
(20) |
Feb
(14) |
Mar
(23) |
Apr
(10) |
May
(11) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(17) |
Dec
(10) |
2007 |
Jan
(41) |
Feb
(6) |
Mar
(23) |
Apr
(15) |
May
(34) |
Jun
(5) |
Jul
(18) |
Aug
(13) |
Sep
(8) |
Oct
(9) |
Nov
(7) |
Dec
(2) |
2008 |
Jan
|
Feb
(1) |
Mar
(18) |
Apr
(1) |
May
(1) |
Jun
(10) |
Jul
(3) |
Aug
|
Sep
(10) |
Oct
(3) |
Nov
(13) |
Dec
(3) |
2009 |
Jan
(4) |
Feb
(10) |
Mar
(1) |
Apr
(11) |
May
(3) |
Jun
(7) |
Jul
(4) |
Aug
(9) |
Sep
(16) |
Oct
(3) |
Nov
(5) |
Dec
(2) |
2010 |
Jan
(3) |
Feb
|
Mar
|
Apr
(7) |
May
(1) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2011 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
(17) |
May
(4) |
Jun
(17) |
Jul
(5) |
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(12) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(6) |
Nov
|
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(8) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
(3) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: W. J. G. <gu...@ea...> - 2001-04-01 04:25:43
|
I'm confused. We've been doing just this for months and it's been working fine. We have a Java process that loads and uses TclBlend and it's Interp and Notifier. Am I missing something? john > -----Original Message----- > From: tcl...@li... > [mailto:tcl...@li...]On Behalf Of Mo DeJong > Sent: Saturday, March 31, 2001 5:36 PM > To: tcl...@li... > Subject: Re: [tcljava-user] Executing tcl script from java using > Interp,need , ,help about classpath > > > On Fri, 30 Mar 2001, Ying Jin wrote: > > > We created a Java program that has these lines of code. The > code does not work for us and the problem appears to be the line > that creates the new Interp object. > > > > We want to be able to call Interp.eval( ) from the Java > program, sending it either a filename with tcl script or a string > with a tcl command. The eval method of the Interp object is > documented in the following html file > > from the documentation: > > C:\unzipped\tclBlend126\tclBlend1.2.6\docs\TclJavaLib\Eval.htm > > I hope this clarifies what we are trying to do. At the moment, > we are just trying to get the example from the documentation to work. > > It sounds like you are trying to load Tcl Blend into a JVM process. > That is not supported in the 1.2 release of Tcl Blend. > > > Are you implying that creating and calling Interp from Java > does not work? > > Yes. > > > We are confused when you say "That is all that is supported in version > > 1.2." Do you mean Java 1.2 or TclBlend 1.2? What do you mean by 1.3 > > version in the CVS? > > Tcl Blend 1.2. The 1.3 version in the CVS is a bit closer to working > in this scenario but more testing and debugging is needed. Everything > should work just fine if you start Tcl first and then load the > JVM into a Tcl process. > > Mo > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > http://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Mo D. <md...@cy...> - 2001-04-01 01:36:13
|
On Fri, 30 Mar 2001, Ying Jin wrote: > We created a Java program that has these lines of code. The code does not work for us and the problem appears to be the line that creates the new Interp object. > > We want to be able to call Interp.eval( ) from the Java program, sending it either a filename with tcl script or a string with a tcl command. The eval method of the Interp object is documented in the following html file > from the documentation: > C:\unzipped\tclBlend126\tclBlend1.2.6\docs\TclJavaLib\Eval.htm > I hope this clarifies what we are trying to do. At the moment, we are just trying to get the example from the documentation to work. It sounds like you are trying to load Tcl Blend into a JVM process. That is not supported in the 1.2 release of Tcl Blend. > Are you implying that creating and calling Interp from Java does not work? Yes. > We are confused when you say "That is all that is supported in version > 1.2." Do you mean Java 1.2 or TclBlend 1.2? What do you mean by 1.3 > version in the CVS? Tcl Blend 1.2. The 1.3 version in the CVS is a bit closer to working in this scenario but more testing and debugging is needed. Everything should work just fine if you start Tcl first and then load the JVM into a Tcl process. Mo |
From: Jiang Wu <jw...@CS...> - 2001-03-30 21:37:42
|
Your usage scenario won't work with the stock 1.2.6 version of TclBlend. You need at a minimum some patches. See http://www-cs-students/~jwu There are some documentation and the patches for 1.2.6. -- Jiang Wu jw...@cs... |
From: Ying J. <yi...@as...> - 2001-03-30 21:02:27
|
Thank you for your response! There is a snippet of code from the documentation that we are trying to get to work. We are trying to create a tcl interpreter object from a Java program. The link to the documentation file in our installed copy of tclBlend is: C:\unzipped\tclBlend126\tclBlend1.2.6\docs\TclJavaLib\Interp.htm The snippet of code from that documentation says: EXAMPLE The following is an example of how an instance of the Interp object may be used: Interp interp; interp = new Interp(); interp.eval("puts {Hello, world}"); interp.dispose(); We created a Java program that has these lines of code. The code does not work for us and the problem appears to be the line that creates the new Interp object. We want to be able to call Interp.eval( ) from the Java program, sending it either a filename with tcl script or a string with a tcl command. The eval method of the Interp object is documented in the following html file from the documentation: C:\unzipped\tclBlend126\tclBlend1.2.6\docs\TclJavaLib\Eval.htm I hope this clarifies what we are trying to do. At the moment, we are just trying to get the example from the documentation to work. Are you implying that creating and calling Interp from Java does not work? We are confused when you say "That is all that is supported in version 1.2." Do you mean Java 1.2 or TclBlend 1.2? What do you mean by 1.3 version in the CVS? Amy Sundermier & Ying Jin Mo DeJong wrote: > On Wed, 28 Mar 2001, Ying Jin wrote: > > > Thank you very much! > > I added tcljava.jar and tclblend.jar to my CLASSPATH, but I got the SAME error message. Could you give me further advise? Thanks a lot. > > I got the SAME error message when I ran this java code inside tcl (After I type nmake shell). But I can successfully run other commands like "puts "say hello" " inside tcl. I also can create my own extension command. > > The only problem is how to invoke tcl script by java code. > > My code stop at new Interp(). Inside the constructor of Interp.java, the code stop at "interpPtr=create( ) ;". > > Thanks a lot. > > Ying > > Step 1: > > Run `nmake shell` that type `package require java`, that should > work and return the version. > > Step 2: > > Get your CLASSPATH and PATH setup the same as in a > `name shell` run. If that works you should be able > to start tcl and run `package require java` without > getting an error. If you get an error, then > your path are not set correctly. > > That is all that is supported in version 1.2. > Your "invoke tcl script by java code" comment is what > has me wondering. Are you trying to load Tcl and > Tcl Blend into an existing JVM? That is > not supported in 1.2, but it does work > in the 1.3 version in the CVS. Is that > what you are trying to do? > > Mo DeJong > Red Hat Inc > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > http://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Mo D. <md...@cy...> - 2001-03-29 06:49:52
|
On Wed, 28 Mar 2001, Ying Jin wrote: > Thank you very much! > I added tcljava.jar and tclblend.jar to my CLASSPATH, but I got the SAME error message. Could you give me further advise? Thanks a lot. > I got the SAME error message when I ran this java code inside tcl (After I type nmake shell). But I can successfully run other commands like "puts "say hello" " inside tcl. I also can create my own extension command. > The only problem is how to invoke tcl script by java code. > My code stop at new Interp(). Inside the constructor of Interp.java, the code stop at "interpPtr=create( ) ;". > Thanks a lot. > Ying Step 1: Run `nmake shell` that type `package require java`, that should work and return the version. Step 2: Get your CLASSPATH and PATH setup the same as in a `name shell` run. If that works you should be able to start tcl and run `package require java` without getting an error. If you get an error, then your path are not set correctly. That is all that is supported in version 1.2. Your "invoke tcl script by java code" comment is what has me wondering. Are you trying to load Tcl and Tcl Blend into an existing JVM? That is not supported in 1.2, but it does work in the 1.3 version in the CVS. Is that what you are trying to do? Mo DeJong Red Hat Inc |
From: D. J. H. <dha...@mi...> - 2001-03-29 06:47:53
|
In the absence of more info from the stack trace, my guess is that the Windows PATH needs to include the directories where the Java Runtime DLL's can be found. The .bat scripts included with tclblend may provide some information on the paths/dlls needed. -=- D. J. On Wed, 28 Mar 2001, Ying Jin wrote: > Hello, > I tried to run code: > Interp interp; > interp = new Interp(); > interp.eval("puts {Hello, world}"); > interp.dispose(); > -------------------------------------------- > I got error: > Exception in thread "main" java.lang.NullPointerException > at tcl.lang.Interp.create(Native Method) > at tcl.lang.Interp.<init>(Interp.java:130) > at RuleMgr.main(RuleMgr.java:11) > tcl.lang.TclRuntimeError: could not find class java/lang/Object. > Check that your path includes the directory where tclblend.dll resides. > Try looking in the directories under the value of tcl_library.. > ----------------------------------------------------------- > But I already set path and classpath to the lib of tcl and tclblend: > set > path=%path%;f:\jdk1.2.2\bin;C:\Progra~1\Tcl\lib;c:\Progrm~1\Tcl\lib\tclblend;c:\unzipped\tclblend126\tclblend1.2.6\win > > set classpath = > %classpath%;f:\jdk1.2.2\lib;c:\unzipped\tcl823\tcl8.2.3\win;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tclblend\;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tcljava\;.;c:\Progra~1\tcl\lib\tclblend;C:\Progra~1\Tcl\lib > > --------------------------------------------------- > What should be added to the path and classpath? > Thanks a lot. > > > > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > http://lists.sourceforge.net/lists/listinfo/tcljava-user > |
From: Ying J. <yi...@as...> - 2001-03-29 06:40:14
|
Thank you very much! I added tcljava.jar and tclblend.jar to my CLASSPATH, but I got the SAME error message. Could you give me further advise? Thanks a lot. I got the SAME error message when I ran this java code inside tcl (After I type nmake shell). But I can successfully run other commands like "puts "say hello" " inside tcl. I also can create my own extension command. The only problem is how to invoke tcl script by java code. My code stop at new Interp(). Inside the constructor of Interp.java, the code stop at "interpPtr=create( ) ;". Thanks a lot. Ying Mo DeJong wrote: > On Wed, 28 Mar 2001, Ying Jin wrote: > > > Hello, > > I tried to run code: > > Interp interp; > > interp = new Interp(); > > interp.eval("puts {Hello, world}"); > > interp.dispose(); > > -------------------------------------------- > > I got error: > > Exception in thread "main" java.lang.NullPointerException > > at tcl.lang.Interp.create(Native Method) > > at tcl.lang.Interp.<init>(Interp.java:130) > > at RuleMgr.main(RuleMgr.java:11) > > tcl.lang.TclRuntimeError: could not find class java/lang/Object. > > Check that your path includes the directory where tclblend.dll resides. > > Try looking in the directories under the value of tcl_library.. > > ----------------------------------------------------------- > > But I already set path and classpath to the lib of tcl and tclblend: > > set > > path=%path%;f:\jdk1.2.2\bin;C:\Progra~1\Tcl\lib;c:\Progrm~1\Tcl\lib\tclblend;c:\unzipped\tclblend126\tclblend1.2.6\win > > > > set classpath = > > %classpath%;f:\jdk1.2.2\lib;c:\unzipped\tcl823\tcl8.2.3\win;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tclblend\;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tcljava\;.;c:\Progra~1\tcl\lib\tclblend;C:\Progra~1\Tcl\lib > > > > --------------------------------------------------- > > What should be added to the path and classpath? > > Thanks a lot. > > You need to add tclblend.jar and tcljava.jar to the CLASSPATH. > You can't just include the directory: > > set CLASSPATH=D:\tcljava.jar;D:\tclblend.jar > > Mo DeJong > Red Hat Inc > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > http://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Mo D. <md...@cy...> - 2001-03-29 06:17:12
|
On Wed, 28 Mar 2001, Ying Jin wrote: > Hello, > I tried to run code: > Interp interp; > interp = new Interp(); > interp.eval("puts {Hello, world}"); > interp.dispose(); > -------------------------------------------- > I got error: > Exception in thread "main" java.lang.NullPointerException > at tcl.lang.Interp.create(Native Method) > at tcl.lang.Interp.<init>(Interp.java:130) > at RuleMgr.main(RuleMgr.java:11) > tcl.lang.TclRuntimeError: could not find class java/lang/Object. > Check that your path includes the directory where tclblend.dll resides. > Try looking in the directories under the value of tcl_library.. > ----------------------------------------------------------- > But I already set path and classpath to the lib of tcl and tclblend: > set > path=%path%;f:\jdk1.2.2\bin;C:\Progra~1\Tcl\lib;c:\Progrm~1\Tcl\lib\tclblend;c:\unzipped\tclblend126\tclblend1.2.6\win > > set classpath = > %classpath%;f:\jdk1.2.2\lib;c:\unzipped\tcl823\tcl8.2.3\win;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tclblend\;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tcljava\;.;c:\Progra~1\tcl\lib\tclblend;C:\Progra~1\Tcl\lib > > --------------------------------------------------- > What should be added to the path and classpath? > Thanks a lot. You need to add tclblend.jar and tcljava.jar to the CLASSPATH. You can't just include the directory: set CLASSPATH=D:\tcljava.jar;D:\tclblend.jar Mo DeJong Red Hat Inc |
From: Ying J. <yi...@as...> - 2001-03-29 06:13:25
|
Hello, I tried to run code: Interp interp; interp = new Interp(); interp.eval("puts {Hello, world}"); interp.dispose(); -------------------------------------------- I got error: Exception in thread "main" java.lang.NullPointerException at tcl.lang.Interp.create(Native Method) at tcl.lang.Interp.<init>(Interp.java:130) at RuleMgr.main(RuleMgr.java:11) tcl.lang.TclRuntimeError: could not find class java/lang/Object. Check that your path includes the directory where tclblend.dll resides. Try looking in the directories under the value of tcl_library.. ----------------------------------------------------------- But I already set path and classpath to the lib of tcl and tclblend: set path=%path%;f:\jdk1.2.2\bin;C:\Progra~1\Tcl\lib;c:\Progrm~1\Tcl\lib\tclblend;c:\unzipped\tclblend126\tclblend1.2.6\win set classpath = %classpath%;f:\jdk1.2.2\lib;c:\unzipped\tcl823\tcl8.2.3\win;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tclblend\;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tcljava\;.;c:\Progra~1\tcl\lib\tclblend;C:\Progra~1\Tcl\lib --------------------------------------------------- What should be added to the path and classpath? Thanks a lot. |
From: Mo D. <md...@cy...> - 2001-03-12 22:19:19
|
On Mon, 12 Mar 2001, Shawn Boyce wrote: > Has anyone ported [incr Tcl] to Java / Jacl? > > -Shawn No. I looked into it, it would not be all that hard. There is one bit of the Tcl namespace code that would need to be implemented to support Itcl (external resolvers). Mo DeJong Red Hat Inc |
From: Shawn B. <sh...@qc...> - 2001-03-12 21:16:03
|
Has anyone ported [incr Tcl] to Java / Jacl? -- -Shawn |
From: Mo D. <md...@cy...> - 2001-03-11 23:52:09
|
On Sun, 11 Mar 2001, Shawn Boyce wrote: > What is the status of Tcl/Java? In development. > When will the 1.3 release > be stable for release? I am not sure, depends on how quickly things get done. Tcl Blend needs a lot of testing before it can be considered safe for production use. I would also like to get Jacl passing 99% of the Tcl 8.3 tests before releasing 1.3. That work is being done, but more developers helping out would make it go a lot faster. > Also it would be really nice to have a detailed list of what > is not supported by Jacl as compared to Tcl 8.x. You mean, like the tcljava/diffs.txt file that is included right now? > FYI, my company started using Tcl in test simulators built using > C/C++ in '97. When a need for a Java-based simulator came long > in '99, we started using Jacl. The Tcl scripting language is a really > good match for doing scripting. Tcl/Jacl makes it very easy to > embed scripting in your application. > > -Shawn Glad you like it. Perhaps you would be interested in investing some time improving Jacl. There is still a lot of work that needs to be done with respect to Tcl 8.3 test cases. If you are interested, join the tcljava-dev mailing list and let folks know you are willing to help. Mo DeJong Red Hat Inc |
From: Shawn B. <sh...@qc...> - 2001-03-11 19:17:27
|
What is the status of Tcl/Java? When will the 1.3 release be stable for release? Also it would be really nice to have a detailed list of what is not supported by Jacl as compared to Tcl 8.x. FYI, my company started using Tcl in test simulators built using C/C++ in '97. When a need for a Java-based simulator came long in '99, we started using Jacl. The Tcl scripting language is a really good match for doing scripting. Tcl/Jacl makes it very easy to embed scripting in your application. -Shawn |
From: Mo D. <md...@cy...> - 2001-03-05 17:45:10
|
Cliff, what part of "Don't post in HTML" did you not understand? You are still doing it! Mo DeJong Red Hat Inc |
From: Cliff R. <cl...@el...> - 2001-03-05 17:41:26
|
Hello: I looked at a similar request in the archives [30Oct2000] and I am have trouble getting any output back from the tcl script. Using the modified sample suggested by Mo DeJong. I am able to get an output returned from the simple tcl script when called by CallTcl.java. myTest.tcl returns a value to the java program when it contains: //myTest.tcl return [exec date] exit0; But it hangs when I try: //mytest.tcl return [exec xclock \&] exit0; It never returns... What I'm trying to learn is, how to return a process ID of an app launched by tcl to java. The original expect script spawned a shell process that returned the process of the spawned shell. From there, I used ps -s to get the process id of the java process launched by the shell. I want to later kill that java process started by the shell. I get, pipe not supported exception message when I tried: if [catch {open "|$command }] So I'm experimenting... execute the expect script and get the return, but it also hangs. Figure out how to change the script to tcl with out using open pipe. So I am using the xclock to fiddle with how to get the process ID with out hanging. I am using: tcl8.3.2 from TclPro1.5 (solaris-sparc) jacl1.2.6 and tclBlend1.2.6 for this exercise... thanks in advance and then-some :-) Cliff // learning sample that executes the tcl script that returns a process id import tcl.lang.*; public class CallTcl { Interp interp = new Interp(); public String evalScript( String s ) throws TclException { interp.eval( "source " + s ); System.out.println("-> " + interp.getResult().toString() ); return interp.getResult().toString(); } public static void main( String args[] ) throws Exception { CallTcl callTcl = new CallTcl(); String cmd = "myTest.tcl"; try { callTcl.evalScript( cmd ); } catch ( TclException te ) { te.printStackTrace(); } callTcl.interp.dispose(); } } // this was the origional expect script I'm trying to convert to tcl #! /opt/ajuba/TclPro1.5/solaris-sparc/bin/expect -- global spawn_id env set web_start $env(MISC_SHELLPATH)/bin/start.sh set web_id [spawn -noecho $web_start] set spawn_id $spawn_id sleep 2 set buf01 [exec ps -s$web_id] set jindex [lsearch $buf01 "java"] set wl_pid [lindex $buf01 [expr $jindex - 3]] return $wl_pid |
From: D. J. H. <dha...@mi...> - 2001-03-04 21:04:43
|
It appears that you're attempting to manage processes from Jacl, not TclBlend, correct? Jacl's process and pipeline handling is not very sophisticated, primarily due to lack of sophistication in the underlying Java API's for managing processes. If you look through the current source code for the "exec" command in Jacl, you'll see that it generates a little in-line Bourne Shell script so that at least some redirection operations will function. It'll generate something like: /bin/sh -c "xclock &" for your command, which will have issues on many systems where /bin/sh lacks job control (e.g., Solaris). There are also some issues with exec not trapping more that a few kb of output to stderr and stdout. These issues are only solveable by using Java threads, where Jacl, currently, is pretty much single-thread oriented. If you really want Tcl's easy/robust process management, stick with the C implementation of Tcl and add in TclBlend if you need to do Java stuff as well. If you are bound and determined to use Java, you will probably need to write a bunch of Java code to use the Runtime and Process classes along with some threads to get your expected results. [and I'll agree with Mo that HTML emails to this list are a distraction and heavily discouraged] -=- D. J. |
From: Mo D. <md...@cy...> - 2001-03-03 04:12:30
|
On Fri, 2 Mar 2001, Cliff Rather wrote: (Bunch of stuff in HTML) Cliff, please disable HTML in your email before posting to the tcljava list again. It is strictly forbidden. Mo DeJong Red Hat Inc |
From: Cliff R. <cl...@el...> - 2001-03-03 03:07:20
|
Hello: I looked at a similar request in the archives [30Oct2000] and I am have trouble getting any output back from the tcl script. Using the modified sample suggested by Mo DeJong. I am able to get an output returned from the simple tcl script when called by CallTcl.java. myTest.tcl returns a value to the java program when it contains: //myTest.tcl return [exec date] exit0; But it hangs when I try: //mytest.tcl return [exec xclock \&] exit0; It never returns... What I'm trying to learn is, how to return a process ID of an app launched by tcl to java. The original expect script spawned a shell process that returned the process of the spawned shell. From there, I used ps -s to get the process id of the java process launched by the shell. I want to later kill that java process started by the shell. I get, pipe not supported exception message when I tried: if [catch {open "|$command }] So I'm experimenting... execute the expect script and get the return, but it also hangs. Figure out how to change the script to tcl with out using open| pipe. So I am using the xclock to fiddle with how to get the process ID with out hanging. I am using: tcl8.3.2 from TclPro1.5 (solaris-sparc) jacl1.2.6 and tclBlend1.2.6 for this exercise... thanks in advance and then-some :-) Cliff // learning sample that executes the tcl script that returns a process id import tcl.lang.*; public class CallTcl { Interp interp = new Interp(); public String evalScript( String s ) throws TclException { interp.eval( "source " + s ); System.out.println("-> " + interp.getResult().toString() ); return interp.getResult().toString(); } public static void main( String args[] ) throws Exception { CallTcl callTcl = new CallTcl(); String cmd = "myTest.tcl"; try { callTcl.evalScript( cmd ); } catch ( TclException te ) { te.printStackTrace(); } callTcl.interp.dispose(); } } // this was the origional expect script I'm trying to convert to tcl #! /opt/ajuba/TclPro1.5/solaris-sparc/bin/expect -- global spawn_id env set web_start $env(MISC_SHELLPATH)/bin/start.sh set web_id [spawn -noecho $web_start] set spawn_id $spawn_id sleep 2 set buf01 [exec ps -s$web_id] set jindex [lsearch $buf01 "java"] set wl_pid [lindex $buf01 [expr $jindex - 3]] return $wl_pid |
From: Mo D. <md...@cy...> - 2001-02-27 20:24:46
|
I just ran across this TclBlend one the net: http://wwwatomsca.atnf.csiro.au/SEP/presentations/TclBlend/ Mo DeJong Red Hat Inc |
From: W. J. G. <gu...@ea...> - 2001-02-25 22:35:33
|
Sorry for the late reply - it's been a long time (and a couple of projects ;) since I played with Tcl/Tcl Blend. We had the same issue with "runaway TCL interps." I solved it by adding a flag to the interp structure, which the Tcl byte code engine checks after each individual bytecode execution. If the flag is non-zero, the bytecode engine does an "abnormalReturn" which causes it to abort (cleanly!) I then added a new method that can be called on the interp - abortExecution(). it seems to work quite well. john > -----Original Message----- > From: Mo DeJong [mailto:md...@cy...] > Sent: Thursday, July 27, 2000 6:18 PM > To: Marc Saegesser > Cc: tc...@sc... > Subject: [Tcl Java] Re: Interrupting a Interp.eval() > > > On Thu, 27 Jul 2000, Marc Saegesser wrote: > > > I'm embedding several Tcl interpreters inside a JVM. I'm > currently using > > Jacl, but will probably switch to TclBlend at some point in the future. > > > > I'm trying to work out the best approach for cleanly shutting down these > > embedded interpreters. If everything is running normally, I can post a > > TclEvent object whose processEvent() method calls Interp.dispose() and > > causes the event loop to terminate. > > > > The problem with this is that I don't see a way to stop an > interpreter that > > has run amok. Suppose that Interp.eval() is processing a script that is > > stuck in an infinite loop. The notifier's event loop isn't > processing new > > events to my shutdown TclEvent will never get processed. Is > there a good > > method for aborting a call to Interp.eval()? > > There is no way to do this in Jacl. The "how do I stop a runaway thread" > problem is a very tricky one. The best you can really do is put and event > into the queue and code your app so it notices the "quit now" event. |
From: Archana B. <AB...@SE...> - 2001-02-07 14:15:39
|
hi, the unsupported::jdetachcall helped and java::bind started working. but there is one place where i am attaching a listener to the combobox and again there it is getting hanged. the combobox is inside dialogbox. -thanks archana -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] Sent: Wednesday, February 07, 2001 1:36 AM To: tcl...@li... Subject: tcljava-user digest, Vol 1 #19 - 5 msgs Send tcljava-user mailing list submissions to tcl...@li... To subscribe or unsubscribe via the World Wide Web, visit http://lists.sourceforge.net/lists/listinfo/tcljava-user or, via email, send a message with subject or body 'help' to tcl...@li... You can reach the person managing the list at tcl...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of tcljava-user digest..." Today's Topics: 1. java::bind problem (Archana Bonde) 2. Re: java::bind problem (Mo DeJong) 3. FW: java::bind does not work (Archana Bonde) 4. RE: Tcl scripts inside EJB (Vikram Rajan) 5. RE: Tcl scripts inside EJB (Mo DeJong) --__--__-- Message: 1 From: Archana Bonde <AB...@SE...> To: tcl...@li... Date: Tue, 6 Feb 2001 11:55:43 +0530 Subject: [tcljava-user] java::bind problem Reply-To: tcl...@li... hi, I am trying to develop an application using Jacl. I wrote a small experimental script in that java::bind seems to be working fine but in my application the whole thing gets hanged. I am unable to describe the error. Is this a bug with the Jacl or there wud be some mistake in my code. Pls help as soon as possible. I tried the tcljava CVS bugs directory but cud not really trace the problem. -Thanks Archana --__--__-- Message: 2 Date: Mon, 5 Feb 2001 22:30:34 -0800 (PST) From: Mo DeJong <md...@cy...> To: tcl...@li... Subject: Re: [tcljava-user] java::bind problem Reply-To: tcl...@li... On Tue, 6 Feb 2001, Archana Bonde wrote: > hi, > I am trying to develop an application using Jacl. I wrote a small > experimental script in that java::bind seems to be working fine but > in my application the whole thing gets hanged. I am unable to describe the > error. Is this a bug with the Jacl or there wud be some mistake in my code. > Pls help as soon as possible. > I tried the tcljava CVS bugs directory but cud not really trace the problem. > -Thanks Archana Please read these two posts from the old mailing list and see if this is the same problem. http://www.mail-archive.com/tc...@sc.../msg00957.html http://www.mail-archive.com/tc...@sc.../msg00958.html Mo DeJong Red Hat Inc --__--__-- Message: 3 From: Archana Bonde <AB...@SE...> To: tcl...@li... Date: Tue, 6 Feb 2001 12:10:14 +0530 Subject: [tcljava-user] FW: java::bind does not work Reply-To: tcl...@li... > -----Original Message----- > From: Archana Bonde > Sent: Tuesday, February 06, 2001 12:06 PM > To: 'tcl...@li...' > Subject: FW: java::bind does not work > > > > -----Original Message----- > From: Archana Bonde > Sent: Thursday, December 14, 2000 11:55 AM > To: 'tcl...@li...' > Subject: java::bind does not work > > i tried using java::bind for binding a routine to a button, the action is > not performed. The routine does not execute and the dialogbox on which the > button is there loses the focus. and the close icon on the dialog boxdoes > not work also.So i have to control C (abort) the application. Not even a > simple routine which has a puts(putouts string on console) in it, work. > Why?? > It does not recognise the java objects > gives error cannopt find f and; no such variable, whereas f is defined and > initialsed by me > > The application seems to stalllllllllllll .Is this a bug with Jacl. --__--__-- Message: 4 From: Vikram Rajan <Vi...@PL...> To: "'tcl...@li...'" <tcl...@li...> Subject: RE: [tcljava-user] Tcl scripts inside EJB Date: Tue, 6 Feb 2001 12:23:01 +0530 Reply-To: tcl...@li... hi, It was a classpath problem. The Jacl interpreter loads classes using the JAVA_CLASSPATH, while weblogic uses the WEBLOGIC_CLASSPATH. For the interpreter to be able to load classes within scripts, they need to be in the java classpath. This again can be a problem at times with weblogic since classes specified in both classpath variables cannot be loaded correctly by weblogic. But I guess, we need to live with that :-) regards, Vikram Rajan > -----Original Message----- > From: Mo DeJong [SMTP:md...@cy...] > Sent: Monday, January 29, 2001 9:35 AM > To: tcl...@li... > Subject: Re: [tcljava-user] Tcl scripts inside EJB > > On Mon, 29 Jan 2001, Vikram Rajan wrote: > > > hi, > > > > I am running Tcl scripts inside EJBs by passing a script to the Jacl > > Interpreter. The problem that I am facing is that am not able to > instantiate > > any Java classes inside the script. A TclException is thrown if I try > that. > > Humm, that should not happen. I am willing to bet that for > some reason the class is not being found by the Java > runtime. > > > Currently I have to pass all required objects to the interpreter using > the > > setVar() method before running the script. > > Is this a restriction of Jacl or am I doing something wrong? > > I don't think so. Could you provide more info, like the error that > is printed? Also, if you could provide a simple example > that does not work, that would really help. > > I am willing to be you are running into some strange issue > that only happens when in your environment. This sort > of thing is almost always caused by CLASSPATH problems > or something to do with classloaders. > > You can test to see if a given class is visible > from inside Jacl or Tcl Blend like so: > > % java::import java.util.Hashtable > > % java::import java.unknown > can not import class "java.unknown", it does not exist > > Mo DeJong > Red Hat Inc > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > http://lists.sourceforge.net/lists/listinfo/tcljava-user --__--__-- Message: 5 Date: Mon, 5 Feb 2001 22:51:32 -0800 (PST) From: Mo DeJong <md...@cy...> To: tcl...@li... Subject: RE: [tcljava-user] Tcl scripts inside EJB Reply-To: tcl...@li... On Tue, 6 Feb 2001, Vikram Rajan wrote: > hi, > > It was a classpath problem. The Jacl interpreter loads classes using the > JAVA_CLASSPATH, while weblogic uses the WEBLOGIC_CLASSPATH. For the > interpreter to be able to load classes within scripts, they need to be in > the java classpath. This again can be a problem at times with weblogic since > classes specified in both classpath variables cannot be loaded correctly by > weblogic. But I guess, we need to live with that :-) > > regards, > Vikram Rajan This workaround might just do the trick for you. You would need to put it in your init code somewhere. % set env(TCL_CLASSPATH) $env(WEBLOGIC_CLASSPATH) Mo DeJong Red Hat Inc --__--__-- _______________________________________________ tcljava-user mailing list tcl...@li... http://lists.sourceforge.net/lists/listinfo/tcljava-user End of tcljava-user Digest |
From: Anil K. <An...@SE...> - 2001-02-07 11:43:05
|
could u pls send me the piece of code u r using.. Anil. -----Original Message----- From: Archana Bonde [mailto:AB...@SE...] Sent: Wednesday, February 07, 2001 11:28 AM To: tcl...@li... Subject: [tcljava-user] RE: tcljava-user digest, Vol 1 #19 - 5 msgs hi, Yes the java::bind problem is almost similar. If the procedure is normally called it runs fine but as soon as i bind it with the evnt. Nothing from the handler script is executed and the whole application hangs. I have to abort the application. Problem seems to be similar. I am also using JDialog boxes etc.and many other swing components. -thanks Archana _______________________________________________ tcljava-user mailing list tcl...@li... http://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Archana B. <AB...@SE...> - 2001-02-07 05:55:29
|
hi, Yes the java::bind problem is almost similar. If the procedure is normally called it runs fine but as soon as i bind it with the evnt. Nothing from the handler script is executed and the whole application hangs. I have to abort the application. Problem seems to be similar. I am also using JDialog boxes etc.and many other swing components. -thanks Archana |
From: Mo D. <md...@cy...> - 2001-02-06 06:51:17
|
On Tue, 6 Feb 2001, Vikram Rajan wrote: > hi, > > It was a classpath problem. The Jacl interpreter loads classes using the > JAVA_CLASSPATH, while weblogic uses the WEBLOGIC_CLASSPATH. For the > interpreter to be able to load classes within scripts, they need to be in > the java classpath. This again can be a problem at times with weblogic since > classes specified in both classpath variables cannot be loaded correctly by > weblogic. But I guess, we need to live with that :-) > > regards, > Vikram Rajan This workaround might just do the trick for you. You would need to put it in your init code somewhere. % set env(TCL_CLASSPATH) $env(WEBLOGIC_CLASSPATH) Mo DeJong Red Hat Inc |
From: Vikram R. <Vi...@PL...> - 2001-02-06 06:44:01
|
hi, It was a classpath problem. The Jacl interpreter loads classes using the JAVA_CLASSPATH, while weblogic uses the WEBLOGIC_CLASSPATH. For the interpreter to be able to load classes within scripts, they need to be in the java classpath. This again can be a problem at times with weblogic since classes specified in both classpath variables cannot be loaded correctly by weblogic. But I guess, we need to live with that :-) regards, Vikram Rajan > -----Original Message----- > From: Mo DeJong [SMTP:md...@cy...] > Sent: Monday, January 29, 2001 9:35 AM > To: tcl...@li... > Subject: Re: [tcljava-user] Tcl scripts inside EJB > > On Mon, 29 Jan 2001, Vikram Rajan wrote: > > > hi, > > > > I am running Tcl scripts inside EJBs by passing a script to the Jacl > > Interpreter. The problem that I am facing is that am not able to > instantiate > > any Java classes inside the script. A TclException is thrown if I try > that. > > Humm, that should not happen. I am willing to bet that for > some reason the class is not being found by the Java > runtime. > > > Currently I have to pass all required objects to the interpreter using > the > > setVar() method before running the script. > > Is this a restriction of Jacl or am I doing something wrong? > > I don't think so. Could you provide more info, like the error that > is printed? Also, if you could provide a simple example > that does not work, that would really help. > > I am willing to be you are running into some strange issue > that only happens when in your environment. This sort > of thing is almost always caused by CLASSPATH problems > or something to do with classloaders. > > You can test to see if a given class is visible > from inside Jacl or Tcl Blend like so: > > % java::import java.util.Hashtable > > % java::import java.unknown > can not import class "java.unknown", it does not exist > > Mo DeJong > Red Hat Inc > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > http://lists.sourceforge.net/lists/listinfo/tcljava-user |