tcljava-user Mailing List for Tcl/Java (Page 22)
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: Scott S. <ss...@am...> - 2006-03-24 05:50:20
|
On 03/23/06 20:37, Mo DeJong wrote: >On Thu, 23 Mar 2006 17:30:20 -0700 >Scott Serr <ss...@am...> wrote: > > >>Hello Tcl Blenders, >> >>We are able to use TclBlend to create a (real, not Jacl) Tcl interpreter >> >> > >I will pretend you did not say that :) > > I should have clarified the need to clarify. We were doing new tcl.lang.Interp() and where using Jacl unknowingly because it was in our CLASSPATH first? I read through the mailing list and you seemed to imply Jacl would not allow for the Tcl "load" command. I did notice when we were "accidently" using it, that it seemed to not inherit environment variables in $env/$::env. So setting up LD_LIBRARY_PATH wasn't an option. Is this normal? Am I way out there? >>Tcl starting the JVM, Tcl "load foo.so" also loads "bar.so" for us. >> >>JVM starting the Tcl Interpreter, Tcl "load foo.so" succeeds but fails >>to load bar.so and has un resolved dependencies. >> >>Any ideas of how to solve this? We thought about combining our dozen or >>so *.so files into one... >> >> > >Humm, another approach you can try is just loading the other >shared libs before you load the one with the deps. Running load Tcl command >with an empty string as the init method will raise an error, but it does >do the OS load behind the scenes. I would give that a try and see if >it fixes things before trying to rebuild libraries. > >I hope that helps >Mo DeJong > > We will try that... I guess ldd will show us what order to try to load them in. Thanks Mo! You and TclBlend are great, excellent work! Without it we would have to be writing large (steaming) piles of C++ instead of (fresh) cart-loads of Java. And TclBlend is so much easier than calling C++ from Tcl, unless I totally missed something. :) Thanks, Scott Serr |
From: Mo D. <md...@un...> - 2006-03-24 03:31:14
|
On Thu, 23 Mar 2006 17:30:20 -0700 Scott Serr <ss...@am...> wrote: > Hello Tcl Blenders, > > We are able to use TclBlend to create a (real, not Jacl) Tcl interpreter I will pretend you did not say that :) > from Java. We have LD_LIBRARY_PATH set. We eval a 'load foo.so' in > Tcl. This works, but foo.so is supposed to automatically load bar.so... > it doesn't. Well, first you should check the shared library to make sure the other shared libs it depends on are linked in. Exactly how you do that depends on the OS, but with Linux you should be able to use ldd. Sometimes the shared libs are not built properly and only the executables actually link in all the shared libs that are needed. > We are using Linux with Sun JDK 1.5.0_06. My cube-mate read that in > general Java didn't use the standard link loader. It even goes on to > say that automatic secondary loading might or might not happen. > > In short... > > Tcl starting the JVM, Tcl "load foo.so" also loads "bar.so" for us. > > JVM starting the Tcl Interpreter, Tcl "load foo.so" succeeds but fails > to load bar.so and has un resolved dependencies. > > Any ideas of how to solve this? We thought about combining our dozen or > so *.so files into one... Humm, another approach you can try is just loading the other shared libs before you load the one with the deps. Running load Tcl command with an empty string as the init method will raise an error, but it does do the OS load behind the scenes. I would give that a try and see if it fixes things before trying to rebuild libraries. I hope that helps Mo DeJong |
From: Scott S. <ss...@am...> - 2006-03-24 00:30:23
|
Hello Tcl Blenders, We are able to use TclBlend to create a (real, not Jacl) Tcl interpreter from Java. We have LD_LIBRARY_PATH set. We eval a 'load foo.so' in Tcl. This works, but foo.so is supposed to automatically load bar.so... it doesn't. We are using Linux with Sun JDK 1.5.0_06. My cube-mate read that in general Java didn't use the standard link loader. It even goes on to say that automatic secondary loading might or might not happen. In short... Tcl starting the JVM, Tcl "load foo.so" also loads "bar.so" for us. JVM starting the Tcl Interpreter, Tcl "load foo.so" succeeds but fails to load bar.so and has un resolved dependencies. Any ideas of how to solve this? We thought about combining our dozen or so *.so files into one... We can't figure out how to do this after the fact, pretending we can't do this at compile time by combining the .o files. Reason is: 1. vendor doesn't support this. 2. the build is a complex mess that builds .o files in a bazillion directories.... who knows which ones we need and if we can do it right. Anyone have this problem? Anyone fix it? Thanks! Scott |
From: Bruce J. <nm...@ma...> - 2006-03-23 23:47:34
|
Yes, I completely support moving to JDK 1.4. Bruce On Mar 23, 2006, at 5:57 PM, Mo DeJong wrote: > On Thu, 23 Mar 2006 16:47:47 +0100 > Marc Ziegenhagen <mz...@pa...> wrote: > >> Hallo >> >> Are the commands socket and fileevent now full work in the >> newest release? > > No. Async sockets and fileevents are not implemented in Jacl because > they are not implemented in Java. It would be possible to get them > implemented in a future release of Jacl, but that would require JDK > 1.4 > or newer in order to get access to the new nio package. > > What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or > newer to run? Is anyone still using JDK versions earlier than this? > > Mo DeJong > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Tom P. <tpo...@ny...> - 2006-03-23 23:36:51
|
On Thu, Mar 23, 2006 at 02:57:33PM -0800, Mo DeJong wrote: > > What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or > newer to run? Is anyone still using JDK versions earlier than this? I'll vote for Java 1.4. I'd love to see fileevents, newer regexps, and other recent Tcl 8.4/8.5 features. -- Tom Poindexter tpo...@ny... |
From: Mo D. <md...@un...> - 2006-03-23 22:51:46
|
On Thu, 23 Mar 2006 16:47:47 +0100 Marc Ziegenhagen <mz...@pa...> wrote: > Hallo > > Are the commands socket and fileevent now full work in the > newest release? No. Async sockets and fileevents are not implemented in Jacl because they are not implemented in Java. It would be possible to get them implemented in a future release of Jacl, but that would require JDK 1.4 or newer in order to get access to the new nio package. What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or newer to run? Is anyone still using JDK versions earlier than this? Mo DeJong |
From: Marc Z. <mz...@pa...> - 2006-03-23 15:47:58
|
Hallo Are the commands socket and fileevent now full work in the=20 newest release? I have a little test script with fileevent and server socket and it does no= t=20 work correct. I become the following message when I make a connection from = a=20 telnet to this script: proc Start_Server {port} { global Server set Server(main) [socket -server Accept $port] } proc Accept {sock addr port} { global Clients puts "Accept $sock from $addr port $port" set Clients(addr,$sock) [list $addr $port] fconfigure $sock -buffering line fileevent $sock readable [list ClientEvent $sock] } proc ClientEvent {sock} { global Clients if {[eof $sock] || [catch {gets $sock line}]} { # end of file or abnormal connection drop close $sock puts "Close $sock from [lindex $Clients(addr,$sock) 0] port\ [lindex $Clients(addr,$sock) 1]" catch {unset echo(addr,$sock)} } else { if {[string length $line]} { puts "Data from $sock:$line" puts $sock $line flush $sock } } } =2D--------------message: Start_Server 40666 set Run 1 puts "Started at [clock format [clock seconds] -format "%Y%m%d-%H%M%S"]" vwait Run puts "Stopped at [clock format [clock seconds] -format "%Y%m%d-%H%M%S"]" Started at 20060323-151326 Accept sock1 from 127.0.0.1 port 51679 tcl.lang.TclException =A0 =A0 =A0 =A0 at tcl.lang.ReturnCmd.cmdProc(ReturnCmd.java:99) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Procedure.cmdProc(Procedure.java:161) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:804) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Procedure.cmdProc(Procedure.java:161) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2222) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2306) =A0 =A0 =A0 =A0 at=20 tcl.lang.SocketConnectionEvent.processEvent(SocketConnectionEvent.java:31) =A0 =A0 =A0 =A0 at tcl.lang.Notifier.serviceEvent(Notifier.java:444) =A0 =A0 =A0 =A0 at tcl.lang.Notifier.doOneEvent(Notifier.java:585) =A0 =A0 =A0 =A0 at tcl.lang.VwaitCmd.cmdProc(VwaitCmd.java:59) =A0 =A0 =A0 =A0 at tcl.lang.AutoloadStub.cmdProc(Extension.java:144) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2222) =A0 =A0 =A0 =A0 at tcl.lang.Interp.evalFile(Interp.java:2401) =A0 =A0 =A0 =A0 at tcl.lang.SourceCmd.cmdProc(SourceCmd.java:75) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2222) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2306) =A0 =A0 =A0 =A0 at tcl.lang.Interp.recordAndEval(Interp.java:2361) =A0 =A0 =A0 =A0 at tcl.lang.ConsoleThread$1.processEvent(Shell.java:321) =A0 =A0 =A0 =A0 at tcl.lang.Notifier.serviceEvent(Notifier.java:444) =A0 =A0 =A0 =A0 at tcl.lang.Notifier.doOneEvent(Notifier.java:585) =A0 =A0 =A0 =A0 at tcl.lang.Shell.main(Shell.java:151) Thanks and bye Marc Ziegenhagen =2D-=20 Marc Ziegenhagen Panorgan AG Pfannenstilstrasse 3 Postfach 470 CH-8820 W=E4denswil Tel. +41 44 783 96 61 =46ax. +41 44 783 96 69 Email mz...@pa... Web http://www.panorgan.ch=09 |
From: Pierce, G. <Gre...@ls...> - 2006-03-20 19:27:44
|
Hi Mo, In my particular situation that doesn't work. I went ahead and modified the TclBlend source to add the capability of creating a slave interp. It's working great. If you're interested I can send you a patch as soon as I figure out how to send you a patch. Greg > -----Original Message----- > From: tcl...@li...=20 > [mailto:tcl...@li...] On Behalf=20 > Of Mo DeJong > Sent: Sunday, March 19, 2006 10:38 PM > To: tcl...@li... > Subject: Re: [tcljava-user] Any plans to support Tcl_CreateSlave >=20 > On Thu, 16 Mar 2006 20:16:07 -0700 > "Pierce, Greg" <Gre...@ls...> wrote: >=20 > > Hi Mo, > > > > Is there any plans to support Tcl_CreateSlave? I would > > love to be able to create a slave interpreter and register > > Java commands for that slave. >=20 > You can already do that: >=20 > set slave [interp create] > $slave eval {set var 0} >=20 > There is no Java level API like the Tcl_CreateSlave method, but you > can just evaluate the commands at runtime. >=20 > cheers > Mo DeJong >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking=20 > scripting language > that extends applications into web and mobile media. Attend=20 > the live webcast > and join the prime developer group breaking into this new=20 > coding territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720& > dat=3D121642 > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user >=20 |
From: Mo D. <md...@un...> - 2006-03-20 18:10:34
|
On Mon, 20 Mar 2006 09:28:45 -0700 "Pierce, Greg" <Gre...@ls...> wrote: > Hi Mo, > > Can you create more than one Interp in a Java thread? Yes. Mo DeJong |
From: Pierce, G. <Gre...@ls...> - 2006-03-20 16:28:49
|
Hi Mo, Can you create more than one Interp in a Java thread? In other words could I do the following in Java? Interp interp1, interp2; interp1.eval("puts {hello from interp1.}"); interp2.eval("puts {hello from interp2.}"); Or, are we restricted to only one interp per Java thread? Greg |
From: Mo D. <md...@un...> - 2006-03-20 03:32:15
|
On Thu, 16 Mar 2006 20:16:07 -0700 "Pierce, Greg" <Gre...@ls...> wrote: > Hi Mo, > > Is there any plans to support Tcl_CreateSlave? I would > love to be able to create a slave interpreter and register > Java commands for that slave. You can already do that: set slave [interp create] $slave eval {set var 0} There is no Java level API like the Tcl_CreateSlave method, but you can just evaluate the commands at runtime. cheers Mo DeJong |
From: Pierce, G. <Gre...@ls...> - 2006-03-20 03:30:34
|
Hi, =20 You could always do the following: =20 interp.eval("source " + fileName); =20 -- Greg =20 ________________________________ From: tcl...@li... [mailto:tcl...@li...] On Behalf Of kar thik Sent: Friday, March 17, 2006 10:58 AM To: tcl...@li... Subject: [tcljava-user] evalFile() is not working in TclBlend =09 =09 Hi All, =20 I have used tclBlend for my project. I want to execute the tcl script file from java using interp.evalFile(<filename>) But I got the following error message =20 Exception in thread "main" tcl.lang.TclRuntimeError: Not implemented yet. =20 Could you please help me to execute Tcl script from Java ?Also let me know tclBlend support this feature.If it doesn't support the feature, then which software will support this feature. =20 Thanks In Advance, Karthik.M =20 =09 ________________________________ Jiyo cricket on Yahoo! India cricket <http://us.rd.yahoo.com/mail/in/mailcricket/*http://in.sports.yahoo.com/ cricket/>=20 Yahoo! Messenger Mobile <http://us.rd.yahoo.com/mail/in/mailmobilemessenger/*http://in.mobile.ya hoo.com/new/messenger/> Stay in touch with your buddies all the time. |
From: kar t. <ka...@ya...> - 2006-03-17 15:58:34
|
Hi All, I have used tclBlend for my project. I want to execute the tcl script file from java using interp.evalFile(<filename>) But I got the following error message Exception in thread "main" tcl.lang.TclRuntimeError: Not implemented yet. Could you please help me to execute Tcl script from Java ?Also let me know tclBlend support this feature.If it doesn't support the feature, then which software will support this feature. Thanks In Advance, Karthik.M --------------------------------- Jiyo cricket on Yahoo! India cricket Yahoo! Messenger Mobile Stay in touch with your buddies all the time. |
From: Pierce, G. <Gre...@ls...> - 2006-03-17 03:16:16
|
Hi Mo, Is there any plans to support Tcl_CreateSlave? I would love to be able to create a slave interpreter and register Java commands for that slave. Greg |
From: Mo D. <md...@un...> - 2006-03-15 01:43:32
|
On Mon, 13 Mar 2006 15:39:30 +0000 "Mike Price" <mik...@ho...> wrote: > I am sorry to be troubling you again but I have been unable to figure out how to set the CLASSPATH > for my project so I can reference my JAVA classes from the tcl command line. It sounds like you are using Windows, so you should be starting up Tcl Blend via the jtclsh.bat script. It is installed in the bin directory when you run "make install". Open up the jtclsh.bat script in an editor and look for the lines where the CLASSPATH is set. Copy the last set command and paste it on a new line, then change the path so that it includes the root dir where your Java classes live. After starting Tcl Blend, you should be able to run: package require java If you were allocating a Java object named Test in the package foo.bar, you would run: set obj [java::new foo.bar.Test] If you get this far, then your CLASSPATH is setup correctly. I hope that fixes you problem. If it does not, then be sure to include the exact error message that you are getting in your next post. cheers Mo DeJong |
From: Mike P. <mik...@ho...> - 2006-03-13 15:39:36
|
I am sorry to be troubling you again but I have been unable to figure out h= ow to set the CLASSPATH for my project so I can reference my JAVA classes f= rom the tcl command line. I have read the manual and 'start here' pages fr= om the tcl/JAVA project homepages and have had no luck. I have tried: =20 % set CLASSPATH=3D%CLASSPATH%;C:/Project/Test3 =20 It is returning that it cannot read the variable. There must be a CLASSPAT= H variable though to set up all the other global variables so I am assuming= I am looking in the wrong place for the variable. =20 I am based at the University of Manchester in my final year doing a softwar= e engineering course so any help would be much appreciated. =20 Thanks, Mike. Ps- are you based at a University? > From: ss...@am...> To: tcl...@li...> Subject: Re= : [tcljava-user] CLASSPATH using tclBlend> Date: Thu, 9 Mar 2006 09:12:01 -= 0700> > What I do, and I think this is the only way to give Tcl/TclBlend yo= ur > CLASSPATH is set it before you run TCL.> > I do in bash (just like I w= ould setup Java, I don't use the -classpath > option):> export CLASSPAT= H=3D/projects/foo.jar> Where you will want to do something similar on DOS.>= > Then you can do:> java:import com.foo.Bar> or> set mytclhandleto= javaobject [java:new Test1]> > Read http://tcljava.sourceforge.net/docs/web= site/getstart.html (Interact > with a Java Object in Tcl) and the manual.> = > -Scott> > Mike Price wrote:> > > I have successfully set up tcl and tclBl= end and run the 'package > > require java' statement which returns the vers= ion number. I want to > > be able to run a method in my separate JAVA prog= ram I have stored at > > C:\Projects\Test and have a single class in the pr= oject called Test1. > > When I try to invoke the method it is returning th= at it cannot find > > the package. I do not know how to set the classpath = up, I have tried:> >> > > >> > % java -classpath C:/Project/Test Test1> >>= > > >> > I don't think I have used the correct syntax though. Could anyo= ne > > tell me how I reference the java package using the classpath? Also, = is > > there anything else I will need to do (importing or referencing for = > > example) in order to get my project running?> >> > > >> > Thanks for y= our time, Michael> >> >> > ------------------------------------------------= ------------------------> > Express yourself instantly with MSN Messenger! = MSN Messenger > > <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>> = > > > > -------------------------------------------------------> This SF.Ne= t email is sponsored by xPML, a groundbreaking scripting language> that ext= ends applications into web and mobile media. Attend the live webcast> and j= oin the prime developer group breaking into this new coding territory!> htt= p://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat=3D1216= 42> _______________________________________________> tcljava-user mailing l= ist> tcl...@li...> https://lists.sourceforge.net/list= s/listinfo/tcljava-user _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/= |
From: Scott S. <ss...@am...> - 2006-03-09 16:12:19
|
What I do, and I think this is the only way to give Tcl/TclBlend your CLASSPATH is set it before you run TCL. I do in bash (just like I would setup Java, I don't use the -classpath option): export CLASSPATH=/projects/foo.jar Where you will want to do something similar on DOS. Then you can do: java:import com.foo.Bar or set mytclhandletojavaobject [java:new Test1] Read http://tcljava.sourceforge.net/docs/website/getstart.html (Interact with a Java Object in Tcl) and the manual. -Scott Mike Price wrote: > I have successfully set up tcl and tclBlend and run the 'package > require java' statement which returns the version number. I want to > be able to run a method in my separate JAVA program I have stored at > C:\Projects\Test and have a single class in the project called Test1. > When I try to invoke the method it is returning that it cannot find > the package. I do not know how to set the classpath up, I have tried: > > > > % java -classpath C:/Project/Test Test1 > > > > I don't think I have used the correct syntax though. Could anyone > tell me how I reference the java package using the classpath? Also, is > there anything else I will need to do (importing or referencing for > example) in order to get my project running? > > > > Thanks for your time, Michael > > > ------------------------------------------------------------------------ > Express yourself instantly with MSN Messenger! MSN Messenger > <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> |
From: Mike P. <mik...@ho...> - 2006-03-09 14:34:24
|
I have successfully set up tcl and tclBlend and run the 'package require ja= va' statement which returns the version number. I want to be able to run a= method in my separate JAVA program I have stored at C:\Projects\Test and h= ave a single class in the project called Test1. When I try to invoke the m= ethod it is returning that it cannot find the package. I do not know how t= o set the classpath up, I have tried: =20 % java -classpath C:/Project/Test Test1=20 =20 I don't think I have used the correct syntax though. Could anyone tell me = how I reference the java package using the classpath? Also, is there anythi= ng else I will need to do (importing or referencing for example) in order t= o get my project running? =20 Thanks for your time, Michael _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/= |
From: Mo D. <md...@un...> - 2006-03-07 00:46:05
|
On Tue, 07 Mar 2006 00:00:08 +0000 "Mike Price" <mik...@ho...> wrote: > I am currently working on a final year project where I am using tcl to > interact with my JAVA program. I have used msys to build the following > programs (for Windows) > > >tcl8.4.12 > >thread2.6.2 > >tclBlend1.3.2 > >Installed j2sdk1.4.2_11 > > I have enabled threads for all of them and built them all without any > errors. I am then running jtclsh.bat in the command window and using the > '%package require java' were it is returning 1.3.2 which is assume is > correct. > > I have also developed a basic JAVA program with a simple class called > 'Hello' that I want to use to simply store the string sent from the tcl > interpreter in a variable and then display the variable while running the > java program. Then I have run the following to try and send a variable to > JAVA: > > % set jstr [java::new String "A Java String"] > java0x1 > > Im guessing that java0x1 is the variable name that I need to reference but > how do I use this variable in my JAVA program? Well, java0x1 is a Java ref to an object. You need to pass it to a Java method like so: public class Test { static String str; public static void mymethod(String in_str) { str = in_str; } } Then you would invoke this Java method from Tcl like so: set jstr [java::new String "A Java String"] java::call Test mymethod $jstr cheers Mo DeJong P.S. You could also look into setting a field of a Java object using java::field. |
From: Mike P. <mik...@ho...> - 2006-03-07 00:00:15
|
I am currently working on a final year project where I am using tcl to interact with my JAVA program. I have used msys to build the following programs (for Windows) >tcl8.4.12 >thread2.6.2 >tclBlend1.3.2 >Installed j2sdk1.4.2_11 I have enabled threads for all of them and built them all without any errors. I am then running jtclsh.bat in the command window and using the '%package require java' were it is returning 1.3.2 which is assume is correct. I have also developed a basic JAVA program with a simple class called 'Hello' that I want to use to simply store the string sent from the tcl interpreter in a variable and then display the variable while running the java program. Then I have run the following to try and send a variable to JAVA: % set jstr [java::new String "A Java String"] java0x1 Im guessing that java0x1 is the variable name that I need to reference but how do I use this variable in my JAVA program? Thanks, Michael |
From: Pierce, G. <Gre...@ls...> - 2006-02-09 17:08:32
|
=20 Hi Mo, I think I found my problem. I wasn't using the libtclstubs8.4.a library I was using the libtcl8.4.a library while compiling my extension. Also, I wasn't including the -DUSE_TCL_STUBS while compiling. My problems seem to have gone away (for now). I need to do some further testing, but I think my problem has been solved. This is a good lesson since my extension worked fine with a basic tcl interperter (i.e. tclsh). However, as soon as I tried to use it in TclBlend I had problems. Greg > -----Original Message----- > From: tcl...@li...=20 > [mailto:tcl...@li...] On Behalf=20 > Of Pierce, Greg > Sent: Wednesday, February 08, 2006 2:05 PM > To: tcl...@li... > Subject: RE: [tcljava-user] Tcl Extension >=20 > Hi Mo DeJong, >=20 > I can get my simple Tcl Extension to work in TclBlend if I do the > following: >=20 > =20 > Interp *iPtr =3D (Interp *) interp; > Tcl_IncrRefCount(iPtr->objResultPtr); >=20 > Tcl_WrongNumArgs(interp, 0, argv, "?pattern?"); >=20 > The above Tcl_WrongNumArgs command will fail with the alloc error if I > don't > Increment the ref count for objResultPtr of the interpreter. >=20 > Does anyone know why I would have to do this? Why is the data=20 > in the Tcl > Interpreter getting messed up? Obviously, I don't want to have to do > this > so I need to figure out why I need to. >=20 > By the way, my Tcl Extension only has one command and the only thing > that > command does it call Tcl_WrongNumArgs. This is as basic Tcl=20 > Extension as > you can get and should work in TclBlend. >=20 > Greg >=20 >=20 > > -----Original Message----- > > From: tcl...@li...=20 > > [mailto:tcl...@li...] On Behalf=20 > > Of Mo DeJong > > Sent: Monday, February 06, 2006 9:27 PM > > To: tcl...@li... > > Subject: Re: [tcljava-user] Tcl Extension > >=20 > > On Mon, 6 Feb 2006 13:40:10 -0700 > > "Pierce, Greg" <Gre...@ls...> wrote: > >=20 > > > Hi, > > > =20 > > > I'm using TclBlend within a Java application to add scripting > > > capabilities. > > > =20 > > > I have a C/C++ based Tcl Extension that I've developed and=20 > > want to use > > > within a Tcl_Interp. I'm able to do a 'package require' of my Tcl > > > Extension > > > =20 > > > Tcl_Interp interp; > > > interp.eval("package require Myext"); > > > interp.eval("mycmd"); > > > =20 > > > but when the extension tries to execute a Tcl C API command like > > > Tcl_AppendResult within 'mycmd' it > > > crashes with an error like: > > > =20 > > > alloc: invalid block: 0xb03be3e0: 1 0 0 > > >=20 > > > Does anyone know why this is happening? > > > =20 > > > I've done some research on this alloc command error and=20 > > what I've found > > > is that > > > it might be related to Tcl Threads. I need to make my application > > > "Thread-Safe". > > > Is this because TclBlend uses Threads? > >=20 > > Yes, Tcl Blend needs to be used with a thread safe build of=20 > > Tcl. Your extension > > also needs to be built with the same version of Tcl so that=20 > > it makes use of thread > > safe APIs. > >=20 > > > Question: Why does TclBlend need to use threads? > >=20 > > Because Tcl Blend interacts with Java and Java is multi=20 > > threaded. This means that > > thread safe APIs needs to be used in all the code running in=20 > > your process. Here is > > a link that describes how to build Tcl and Tcl Blend so that=20 > > they are thread safe. > > You should try recompiling your extension with the thread=20 > > safe version of Tcl > > you built and see if that helps. You might also check the=20 > > CFLAGS being used > > when your extension is compiled to make sure the proper flags=20 > > are being passed > > on the compiler command line. > >=20 > > http://wiki.tcl.tk/9993 > >=20 > > cheers > > Mo DeJong > >=20 > >=20 > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep=20 > > through log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. =20 > > DOWNLOAD SPLUNK! > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486& > dat=3D121642 > > _______________________________________________ > > tcljava-user mailing list > > tcl...@li... > > https://lists.sourceforge.net/lists/listinfo/tcljava-user > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep=20 > through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. =20 > DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=103432&bid#0486&dat=121642 > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user >=20 |
From: Pierce, G. <Gre...@ls...> - 2006-02-08 19:04:53
|
Hi Mo DeJong, I can get my simple Tcl Extension to work in TclBlend if I do the following: =20 Interp *iPtr =3D (Interp *) interp; Tcl_IncrRefCount(iPtr->objResultPtr); Tcl_WrongNumArgs(interp, 0, argv, "?pattern?"); The above Tcl_WrongNumArgs command will fail with the alloc error if I don't Increment the ref count for objResultPtr of the interpreter. Does anyone know why I would have to do this? Why is the data in the Tcl Interpreter getting messed up? Obviously, I don't want to have to do this so I need to figure out why I need to. By the way, my Tcl Extension only has one command and the only thing that command does it call Tcl_WrongNumArgs. This is as basic Tcl Extension as you can get and should work in TclBlend. Greg > -----Original Message----- > From: tcl...@li...=20 > [mailto:tcl...@li...] On Behalf=20 > Of Mo DeJong > Sent: Monday, February 06, 2006 9:27 PM > To: tcl...@li... > Subject: Re: [tcljava-user] Tcl Extension >=20 > On Mon, 6 Feb 2006 13:40:10 -0700 > "Pierce, Greg" <Gre...@ls...> wrote: >=20 > > Hi, > > =20 > > I'm using TclBlend within a Java application to add scripting > > capabilities. > > =20 > > I have a C/C++ based Tcl Extension that I've developed and=20 > want to use > > within a Tcl_Interp. I'm able to do a 'package require' of my Tcl > > Extension > > =20 > > Tcl_Interp interp; > > interp.eval("package require Myext"); > > interp.eval("mycmd"); > > =20 > > but when the extension tries to execute a Tcl C API command like > > Tcl_AppendResult within 'mycmd' it > > crashes with an error like: > > =20 > > alloc: invalid block: 0xb03be3e0: 1 0 0 > >=20 > > Does anyone know why this is happening? > > =20 > > I've done some research on this alloc command error and=20 > what I've found > > is that > > it might be related to Tcl Threads. I need to make my application > > "Thread-Safe". > > Is this because TclBlend uses Threads? >=20 > Yes, Tcl Blend needs to be used with a thread safe build of=20 > Tcl. Your extension > also needs to be built with the same version of Tcl so that=20 > it makes use of thread > safe APIs. >=20 > > Question: Why does TclBlend need to use threads? >=20 > Because Tcl Blend interacts with Java and Java is multi=20 > threaded. This means that > thread safe APIs needs to be used in all the code running in=20 > your process. Here is > a link that describes how to build Tcl and Tcl Blend so that=20 > they are thread safe. > You should try recompiling your extension with the thread=20 > safe version of Tcl > you built and see if that helps. You might also check the=20 > CFLAGS being used > when your extension is compiled to make sure the proper flags=20 > are being passed > on the compiler command line. >=20 > http://wiki.tcl.tk/9993 >=20 > cheers > Mo DeJong >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep=20 > through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. =20 > DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486& dat=3D121642 > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user >=20 |
From: Pierce, G. <Gre...@ls...> - 2006-02-07 20:10:43
|
Hi, I did what you suggested and it's no use. I still get the error and I'm positive that my extension is using the same version of Tcl and with the right compiler options. Has anyone else successfully build a Tcl Extension and loaded into an interpreter within TclBlend? Greg=20 > -----Original Message----- > From: tcl...@li...=20 > [mailto:tcl...@li...] On Behalf=20 > Of Mo DeJong > Sent: Monday, February 06, 2006 9:27 PM > To: tcl...@li... > Subject: Re: [tcljava-user] Tcl Extension >=20 > On Mon, 6 Feb 2006 13:40:10 -0700 > "Pierce, Greg" <Gre...@ls...> wrote: >=20 > > Hi, > > =20 > > I'm using TclBlend within a Java application to add scripting > > capabilities. > > =20 > > I have a C/C++ based Tcl Extension that I've developed and=20 > want to use > > within a Tcl_Interp. I'm able to do a 'package require' of my Tcl > > Extension > > =20 > > Tcl_Interp interp; > > interp.eval("package require Myext"); > > interp.eval("mycmd"); > > =20 > > but when the extension tries to execute a Tcl C API command like > > Tcl_AppendResult within 'mycmd' it > > crashes with an error like: > > =20 > > alloc: invalid block: 0xb03be3e0: 1 0 0 > >=20 > > Does anyone know why this is happening? > > =20 > > I've done some research on this alloc command error and=20 > what I've found > > is that > > it might be related to Tcl Threads. I need to make my application > > "Thread-Safe". > > Is this because TclBlend uses Threads? >=20 > Yes, Tcl Blend needs to be used with a thread safe build of=20 > Tcl. Your extension > also needs to be built with the same version of Tcl so that=20 > it makes use of thread > safe APIs. >=20 > > Question: Why does TclBlend need to use threads? >=20 > Because Tcl Blend interacts with Java and Java is multi=20 > threaded. This means that > thread safe APIs needs to be used in all the code running in=20 > your process. Here is > a link that describes how to build Tcl and Tcl Blend so that=20 > they are thread safe. > You should try recompiling your extension with the thread=20 > safe version of Tcl > you built and see if that helps. You might also check the=20 > CFLAGS being used > when your extension is compiled to make sure the proper flags=20 > are being passed > on the compiler command line. >=20 > http://wiki.tcl.tk/9993 >=20 > cheers > Mo DeJong >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep=20 > through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. =20 > DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486& dat=3D121642 > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user >=20 |
From: Mo D. <md...@un...> - 2006-02-07 02:21:46
|
On Mon, 6 Feb 2006 13:40:10 -0700 "Pierce, Greg" <Gre...@ls...> wrote: > Hi, > > I'm using TclBlend within a Java application to add scripting > capabilities. > > I have a C/C++ based Tcl Extension that I've developed and want to use > within a Tcl_Interp. I'm able to do a 'package require' of my Tcl > Extension > > Tcl_Interp interp; > interp.eval("package require Myext"); > interp.eval("mycmd"); > > but when the extension tries to execute a Tcl C API command like > Tcl_AppendResult within 'mycmd' it > crashes with an error like: > > alloc: invalid block: 0xb03be3e0: 1 0 0 > > Does anyone know why this is happening? > > I've done some research on this alloc command error and what I've found > is that > it might be related to Tcl Threads. I need to make my application > "Thread-Safe". > Is this because TclBlend uses Threads? Yes, Tcl Blend needs to be used with a thread safe build of Tcl. Your extension also needs to be built with the same version of Tcl so that it makes use of thread safe APIs. > Question: Why does TclBlend need to use threads? Because Tcl Blend interacts with Java and Java is multi threaded. This means that thread safe APIs needs to be used in all the code running in your process. Here is a link that describes how to build Tcl and Tcl Blend so that they are thread safe. You should try recompiling your extension with the thread safe version of Tcl you built and see if that helps. You might also check the CFLAGS being used when your extension is compiled to make sure the proper flags are being passed on the compiler command line. http://wiki.tcl.tk/9993 cheers Mo DeJong |
From: Pierce, G. <Gre...@ls...> - 2006-02-06 20:40:12
|
Hi, =20 I'm using TclBlend within a Java application to add scripting capabilities. =20 I have a C/C++ based Tcl Extension that I've developed and want to use within a Tcl_Interp. I'm able to do a 'package require' of my Tcl Extension =20 Tcl_Interp interp; interp.eval("package require Myext"); interp.eval("mycmd"); =20 but when the extension tries to execute a Tcl C API command like Tcl_AppendResult within 'mycmd' it crashes with an error like: =20 alloc: invalid block: 0xb03be3e0: 1 0 0 Does anyone know why this is happening? =20 I've done some research on this alloc command error and what I've found is that it might be related to Tcl Threads. I need to make my application "Thread-Safe". Is this because TclBlend uses Threads? =20 Question: Why does TclBlend need to use threads? =20 I'm kind of at a loss, I'm not sure where to go from here. Any help would be greatly appreciated! =20 Thanks, =20 Greg =20 |