tcljava-user Mailing List for Tcl/Java (Page 17)
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: Tom P. <tpo...@ny...> - 2007-03-23 14:16:46
|
On Fri, Mar 23, 2007 at 01:38:01PM +0000, Patrick Finnegan wrote: > Error occurs when variable is used as command. This problem does not occur > on Komodo 4.0 or RamDebugger. > > set ConnectionI [ java::call DriverManager getConnection $url ] > > putsLog "transaction isolation level is [ $ConnectionI > getTransactionIsolation ]" > > $ConnectionI resolves to "java0x2" > > Error msg. > > invalid command name "java0x2" > while executing > "$ConnectionI getTransactionIsolation" > I don't have TDK so I can't confirm, but it appears to me that the reflected Connection object is being garbage collected, possibly due to going out of scope while be run by the debugger. Try using: java::autolock 1 or wrap your connection with: java::lock [ set ConnectionI [ java::call DriverManager getConnection $url ] ] -- Tom Poindexter tpo...@ny... |
From: Patrick F. <pfi...@oz...> - 2007-03-23 13:38:16
|
Anyone know why this would happen? Patrick Using TclDev kit 4..02 Beta debugger with TclBlend 1.4 as interpreter on Windows XP. Error occurs when variable is used as command. This problem does not occur on Komodo 4.0 or RamDebugger. set ConnectionI [ java::call DriverManager getConnection $url ] putsLog "transaction isolation level is [ $ConnectionI getTransactionIsolation ]" $ConnectionI resolves to "java0x2" Error msg. invalid command name "java0x2" while executing "$ConnectionI getTransactionIsolation" The JACL syntax is valid and runs correctly from the command line. Is this valid debugger behavior? NB: The error only occurs when stepping through the code using PF6. Run to end with PF5 is fine. The same problem occurs with Dev Kit 3.2. TEST **** Put the following code snippet in a script and step through it. package require java set jstring [java::new String "Hello World"] # Convert the Java string to a Tcl string set tstring [$jstring toString] invalid command name "java0x2" while executing "$jstring toString" You can grab TclBlend from here: www.patrickfinnegan.com/ |
From: Patrick F. <pfi...@oz...> - 2007-03-19 12:07:00
|
There are three ways of using Tcl with JACL. 1. Tcl intepreter written in Java - JACL. JACL is a cut down version of Tcl where Tcl commands have been written in Java rather than C. e.g the "puts" command looks like: package tcl.lang; /** * This class implements the built-in "list" command in Tcl. */ class ListCmd implements Command { /** * See Tcl user documentation for details. */ public void cmdProc(Interp interp, TclObject argv[]) throws TclException { TclObject list = TclList.newInstance(); try { for (int i = 1; i<argv.length; i++) { TclList.append(interp, list, argv[i]); } interp.setResult(list); } catch (TclException te) { list.release(); throw te; } } } None of the non core Tcl extensions have been ported to Java so non core packages such as Tk(wish) Expect, HTTP, SOAP etc are not available in JACL and JACL scripts are limited to using the basic Tcl command set which in the case of some commands is still at version 8.0. So it's very limited especially when you can't run TK apps. It's package require command is architected to search jar files in the java classpath. So it's difficult if not impossible to port an existing Tcl application to JACL without a rewrite of the app. No can do ---> "The whole purpose of this exercise is to remove the need for a seperate Tcl interpreter installation by using the one within Jacl". 2. Tcl intepreter written in C that loads it's own JVM using JNI. This is essentially loading a Java runtime under a C runtime. It's designed for Tcl programmers that want to work with Java and supports all Tcl packages including Tk(wish). See patrickfinnegan.com for a description. 3. Tcl intepreter written in C loaded into the JVM. This is what you want and it should be possible to load Tclblend into the JVM but I have not tried it as I do most of my work with JACL and TclBlend --> Java. There is an excellent description of this type of architecture at: http://www.ensta.fr/~diam/tcl/online/Using_Tcl_in_Java-20010106.html#7 You can grap the TclBlend binary from patrickfinnegan.com Sent with SnapperMail www.snappermail.com |
From: <ni...@ma...> - 2007-03-19 10:45:49
|
Hi, Your error is that the starkit package is not found. This is part of the vfs package, which is shipped with tcl8.4... I dont know how ones uses tcl packages from jacl, as I'm a new tclblend user.. but it seems you are currently sourcing tcl scripts (unwrapped), and not starkits, which is what the starkit package is required for. You might want to bypass this if you are not planning on using starkits. regards, nikos > Hello, > > I am trying to run a tcl script that then runs a tcl script application. > This is normally done by calling main.tcl and the wish84.exe in the Tcl > Interpreter /bin directory via a desktop shortcut. main.tcl then calls > another file which calls several more... > > I am now attempting to perform a similar operation (running the app) by > calling main.tcl using evalFile. However when I run the program I get the > error: > > "can't find package starkit". > > I have tried placing the java file(s) which invoke this in several > directories, including the one where main.tcl is located and the > 'start-in' > location pointed to in the desktop shortcut(s). > > This is the main.tcl file: > ================= > package require starkit > starkit::startup > package require app-start > > ============== > > The callStapTk() java method: > ==================== > public void callStapTk() { > > Interp callingStap = new Interp(); > try { > callingStap.evalFile(defaultStapLoc); /* String defaultStapLoc > = > "C:\\dissproject\\starkits\\staptk.vfs\\main.tcl"; */ > System.out.println("Running default StapTk..."); > > } catch (TclException ex) { > int code = ex.getCompletionCode(); > switch (code) { > case TCL.ERROR: > > System.err.println(callingStap.getResult().toString()); > break; > case TCL.BREAK: > System.err.println( > "invoked \"break\" outside of a loop"); > break; > case TCL.CONTINUE: > System.err.println( > "invoked \"continue\" outside of a loop"); > break; > default: > System.err.println( > "command returned bad error code: " + code); > break; > } > } finally { > callingStap.dispose(); > } > > } > > =================== > The Desktop Shortcut properties: > > Target Type: Application > Target location: bin > Target: C:\Tcl\bin\wish84.exe C:\dissproject\starkits\staptk.vfs\main.tcl > Start In: C:\dissproject\STAPTK-INSTALL > > ================== > > This is the same file that is called in the shortcut, which has no problem > finding packages. Do I have to modify the evalFile call? The whole purpose > of this exercise is to remove the need for a seperate Tcl interpreter > installation by using the one within Jacl. > > Any help, advice, code, much appreciated. > > Richard > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user > |
From: Richard S. <arc...@gm...> - 2007-03-18 23:06:33
|
Hello, I am trying to run a tcl script that then runs a tcl script application. This is normally done by calling main.tcl and the wish84.exe in the Tcl Interpreter /bin directory via a desktop shortcut. main.tcl then calls another file which calls several more... I am now attempting to perform a similar operation (running the app) by calling main.tcl using evalFile. However when I run the program I get the error: "can't find package starkit". I have tried placing the java file(s) which invoke this in several directories, including the one where main.tcl is located and the 'start-in' location pointed to in the desktop shortcut(s). This is the main.tcl file: ================= package require starkit starkit::startup package require app-start ============== The callStapTk() java method: ==================== public void callStapTk() { Interp callingStap = new Interp(); try { callingStap.evalFile(defaultStapLoc); /* String defaultStapLoc = "C:\\dissproject\\starkits\\staptk.vfs\\main.tcl"; */ System.out.println("Running default StapTk..."); } catch (TclException ex) { int code = ex.getCompletionCode(); switch (code) { case TCL.ERROR: System.err.println(callingStap.getResult().toString()); break; case TCL.BREAK: System.err.println( "invoked \"break\" outside of a loop"); break; case TCL.CONTINUE: System.err.println( "invoked \"continue\" outside of a loop"); break; default: System.err.println( "command returned bad error code: " + code); break; } } finally { callingStap.dispose(); } } =================== The Desktop Shortcut properties: Target Type: Application Target location: bin Target: C:\Tcl\bin\wish84.exe C:\dissproject\starkits\staptk.vfs\main.tcl Start In: C:\dissproject\STAPTK-INSTALL ================== This is the same file that is called in the shortcut, which has no problem finding packages. Do I have to modify the evalFile call? The whole purpose of this exercise is to remove the need for a seperate Tcl interpreter installation by using the one within Jacl. Any help, advice, code, much appreciated. Richard |
From: Mo D. <mo...@mo...> - 2007-03-15 21:29:56
|
Wei Dai wrote: > > Also TclEvent.sync has a wait(0) with a while loop and also ignores > the interrupted exception, if you are doing a event.sync, your eval > will never return when cancel occurs! > > Why do a lot of places specifically ignore the interrupt? > Wei, this is from my previous email: > A Jacl interp uses TclInterruptedException, the InterruptedException above is a Java primitive class > that has nothing to do with this Jacl feature. cheers Mo DeJong |
From: Wei D. <wd...@fn...> - 2007-03-15 01:07:53
|
HI Mo, Thanks for the response. I did debug the program and it seems that when interp.eval(script) is invoked, JACL will parse it and call its internal eval with parsed body and the only time it checks for the interrupted flag is when that eval completes. When it eval a loop, the body of the loop is being eval separated from the loop condition, that is why cancel would work as it would detect the flag after one iteration of eval is done. It also means that cancellation of a single command won't work. Like if you call eval with 'after 30000' and you set cancel after eval has been started, cancel will not have any effect since it will not check until the eval of the AfterCmd completes. The AfterCmd code specifically ignores the interrupted exception, which I do not quite understand. Also TclEvent.sync has a wait(0) with a while loop and also ignores the interrupted exception, if you are doing a event.sync, your eval will never return when cancel occurs! Why do a lot of places specifically ignore the interrupt? Was it a specific design decision to NOT to support single eval command cancellation? Thanks, Wei -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] On Behalf Of Mo DeJong Sent: Wednesday, March 14, 2007 4:37 PM To: A list for users of tcljava Subject: Re: [tcljava-user] JACL eval cancellation Wei Dai wrote: > > Hi Mo, > > Just got a chance to try it out, it seems that the cancellation only=20 > takes effect for a loop, so the following case did not work: > > 1. Cancellation of single command such as After 10000 did not work. > 2. Cancellation of a proc: if the proc contains a loop ( I tried=20 > while loop ), it will break out of the while loop and return from the=20 > proc immediately, but if there is no while loop, it will continue=20 > executing all the remaining statement/command in the proc as if there=20 > is no cancellation. > This is not a bug, it is likely caused by a race condition. The cancel=20 check happens after an eval() operation is done. See when checkInterrupted() in invoked in Interp.java. It sounds like this=20 exception check happens later than you expect in the script. It has nothing to do with loop commands, it has to do=20 with when an eval() operation ends. > 3. Why TclEvent.sync() API implementation eats=20 > InterruptedException : > > * while* (!isProcessed) { > > * try* { > > wait(0); > > }* catch* (InterruptedException e) { > > continue;=20 > > } > > } > > Are those known issues/limitations or am I missing something here? > A Jacl interp uses TclInterruptedException, the InterruptedException=20 above is a Java primitive class that has nothing to do with this Jacl feature. cheers Mo ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Mo D. <mo...@mo...> - 2007-03-15 00:37:06
|
Wei Dai wrote: > > Hi Mo, > > Just got a chance to try it out, it seems that the cancellation only > takes effect for a loop, so the following case did not work: > > 1. Cancellation of single command such as After 10000 did not work. > 2. Cancellation of a proc: if the proc contains a loop ( I tried > while loop ), it will break out of the while loop and return from the > proc immediately, but if there is no while loop, it will continue > executing all the remaining statement/command in the proc as if there > is no cancellation. > This is not a bug, it is likely caused by a race condition. The cancel check happens after an eval() operation is done. See when checkInterrupted() in invoked in Interp.java. It sounds like this exception check happens later than you expect in the script. It has nothing to do with loop commands, it has to do with when an eval() operation ends. > 3. Why TclEvent.sync() API implementation eats > InterruptedException : > > * while* (!isProcessed) { > > * try* { > > wait(0); > > }* catch* (InterruptedException e) { > > continue; > > } > > } > > Are those known issues/limitations or am I missing something here? > A Jacl interp uses TclInterruptedException, the InterruptedException above is a Java primitive class that has nothing to do with this Jacl feature. cheers Mo |
From: Mo D. <mo...@mo...> - 2007-03-15 00:28:57
|
Tom Poindexter wrote: > On Tue, Feb 27, 2007 at 05:03:35PM +0000, Patrick Finnegan wrote: > >> Using jacl 1.4. "- all" is not a valid option for lsearch. What version >> of Tcl corresponds to JACL. Anything more recent than 8.0. >> I believe it mostly 8.0, with some commands having 8.0 - 8.4 features. >> Yes, it is mostly 8.0. Some commands have been upgraded to work more like 8.3, but more work needs to be done. >> On my to-do list is auditing Jacl commands vis-a-vis Tcl 8.4, and >> coming up with a list of commands to implement or enhance to >> 8.4 levels. I figure if *we* (the collective, but relatively very small >> community of Jacl users) attack one or two commands each, we can >> bring Jacl up to 8.4 compliance. 'fileevent' and a newer 'regexp/regsub' >> are probably the most difficult. >> Non-blocking IO is going to be a real pain, but the regexp implementation should not be too hard. The newer JDK 1.4 regexp engine can now be used so that should make the problem much easier to solve. >> Who else is willing to volunteer Yes, if folks would like to contribute some time to help upgrade Jacl commands to support the full 8.4 feature set, that would be great. I can put together a plan and outline what needs to be done, but engineering time is needed to implement things. Mo DeJong |
From: Mo D. <mo...@mo...> - 2007-03-15 00:20:07
|
Patrick Finnegan wrote: > . > > I jarred up tcllib but I can't get it to work . > > jar -cvf tcllib1.8.jar tcllib1.8 > > C:\Tcl\lib>java -classpath tcllib1.8.jar tcl.lang.Shell > > % set auto_path > resource:/tcl/lang/library > > % lappend auto_path resource:/tcllib1.8 > resource:/tcl/lang/library resource:/tcllib1.8 > > % package require autoproxy > can't find package autoproxy > What happens when you run: source resource:/tcllib1.8/pkgIndex.tcl If that does not work, then the package subsystem is not going to know how to load the packages. cheers Mo DeJong |
From: Patrick F. <pfi...@oz...> - 2007-03-13 22:12:06
|
On Tuesday 13 March 2007 11:11, ni...@ma... wrote: > Hello all, > > 1. Straight sockets. I've been able to test very basic tclclient with > basic java server and it seems to work. > I feel this might be too low level and complex for anything realworld. > > 2. Ask the java guys to create XML/RPC or SOAP wrappers on their methods > and call these via tclsoap. > Here I feel this could work as long as we are only passing url's to the > source files and not any real (big/complex) data sets. Probably not a good > idea if we ever have to send any actual data for processing. > > 3. Use tclblend to talk to the developed java objects. > Here I feel alot of work would fall on the tclers understanding the java > classes, methods etc. Datatypes might also be a concern.Additionally, we > would not be able to separate concerns either, as IIUC, tclblend talks to > "resident" java classes. Usage of the java app by third party apps would > be limited to java based stuff > > 4. Have the java guys develop a local (to tcl) java stub/facade that > tclblend can talk to, maybe via xml-rpc, and then have their stub talk to > remote java methods via java RMI (of which I know nothing about, but the > java guys kinda drool over...) > I feel this approach addresses most of the areas, such as keeping things > simple for the tcl side, xml-rpc would allow third party usage and layer > the application and finally let the java guys can worry about datatypes, > serialization and stuff like that... > > thanx in advance for any feedback, > Forget 1 and 2. Java client to Java server is the way to go. 3 is problematic if the Java app is now well documented and the Tcl Team are reliant on having a working Java app for development and testing. 4 is the best choice as it allows the Java developers to develop and test their app independently of the Tcl Team. Your biggest issue could be coordinating the development teams. Patrick. |
From: <ni...@ma...> - 2007-03-13 12:55:42
|
Hello all, I'm a beginning tclblend user and would like to thank all for making and maintaining this package. I'm currently using Mo's win binary and it looks good ;-) The main reason I'm looking into tclblend is for integration of an existing tclhttpd application with additional functionality that will most likely be coded by other developers in java. I've been asked to recommend on how the 2 apps should communicate, so I really could appreciate some feedback from more experienced integrators, if you are not too busy. The basic scenario is that users upload array type of datasets, imagery and then select array processing functions and or models to run on their data. We are currently using tclnap for some array processing and have been quite pleased with the results. The new, java developers will write some modeling sw (environmental risk assessment stuff) in java and use the said input files, process the data and return results (or probably file pointers or url's) back to tcl. Keeping in mind that it would probably be a good idea to kinda layer or separate the processes, possibly on separate machines I've been thinking of a few approaches on how to communicate between the tcl frontend and the java backend. 1. Straight sockets. I've been able to test very basic tclclient with basic java server and it seems to work. I feel this might be too low level and complex for anything realworld. 2. Ask the java guys to create XML/RPC or SOAP wrappers on their methods and call these via tclsoap. Here I feel this could work as long as we are only passing url's to the source files and not any real (big/complex) data sets. Probably not a good idea if we ever have to send any actual data for processing. 3. Use tclblend to talk to the developed java objects. Here I feel alot of work would fall on the tclers understanding the java classes, methods etc. Datatypes might also be a concern.Additionally, we would not be able to separate concerns either, as IIUC, tclblend talks to "resident" java classes. Usage of the java app by third party apps would be limited to java based stuff 4. Have the java guys develop a local (to tcl) java stub/facade that tclblend can talk to, maybe via xml-rpc, and then have their stub talk to remote java methods via java RMI (of which I know nothing about, but the java guys kinda drool over...) I feel this approach addresses most of the areas, such as keeping things simple for the tcl side, xml-rpc would allow third party usage and layer the application and finally let the java guys can worry about datatypes, serialization and stuff like that... thanx in advance for any feedback, nikos |
From: Richard S. <arc...@gm...> - 2007-03-12 22:29:39
|
Hello again, Just a quick post to you let you know that I followed Patrick Finnegan's advice, and copied the *.jar files to the lib/ext folders of my java vm installation(s). I have had no problems running Jacl since then and this seems to be the 'cleanest' and easiest method I've come across so far. Thanks again, Richard. On 12/03/07, Mo DeJong <mo...@mo...> wrote: > > Richard Shaw wrote: > > Hello, > > > > I have spent the last week or so trying to install, and use Jacl on a > > Windows XP system. When I installed the latest 'binary release' I was > > able to run the jaclsh.bat file but my java program would not compile > > as it was not able to find the tcl.lang.* package. (I first tried > > using the code on the Get Started page but to no avail) > > > > Only after compiling the source files and then copying the tcl folder > > to the same location as my test file was I able to compile a small > > program that imports the tcl.lang package and creates a Interp > > instance - printing an 'OK' message one it's done that. When I run the > > program however it returns the error... > > Richard, the problem you are having has nothing to do with Jacl. This is > a Java CLASSPATH issue. You need to setup the > CLASSPATH env var before invoking javac so that both jacl.jar and > tcljava.jar appear on the CLASSPATH. You should be able > to just download the binary Jacl release and use it as is. Please post > another message if you are still having problems after the > CLASSPATH is setup properly. > > cheers > Mo DeJong > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user > -- Homepage: http://www.dcs.shef.ac.uk/~u4rs Web Radio: http://music.uk.launch.yahoo.com/lc/?rt=0&rp1=0&rp2=1222724716 |
From: Mo D. <mo...@mo...> - 2007-03-12 22:26:01
|
Richard Shaw wrote: > Hello, > > I have spent the last week or so trying to install, and use Jacl on a > Windows XP system. When I installed the latest 'binary release' I was > able to run the jaclsh.bat file but my java program would not compile > as it was not able to find the tcl.lang.* package. (I first tried > using the code on the Get Started page but to no avail) > > Only after compiling the source files and then copying the tcl folder > to the same location as my test file was I able to compile a small > program that imports the tcl.lang package and creates a Interp > instance - printing an 'OK' message one it's done that. When I run the > program however it returns the error... Richard, the problem you are having has nothing to do with Jacl. This is a Java CLASSPATH issue. You need to setup the CLASSPATH env var before invoking javac so that both jacl.jar and tcljava.jar appear on the CLASSPATH. You should be able to just download the binary Jacl release and use it as is. Please post another message if you are still having problems after the CLASSPATH is setup properly. cheers Mo DeJong |
From: Patrick F. <pfi...@oz...> - 2007-03-06 21:45:24
|
On Tuesday 06 March 2007 20:59, Richard Shaw wrote: > Hello, > > I have spent the last week or so trying to install, and use Jacl on a > Windows XP system. When I installed the latest 'binary release' I was able Hi Richard. See the following post at Java Ranch on how to run the JACL shell. http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=60&t=000208 You could use it to verify your installation and ensure that the jacl classes are dynamically loaded by the JVM. No need for bat files. If you still have issues send me your code. I am based in Sheffield at the moment. Regards. Patrick. |
From: Richard S. <arc...@gm...> - 2007-03-06 20:59:05
|
Hello, I have spent the last week or so trying to install, and use Jacl on a Windows XP system. When I installed the latest 'binary release' I was able to run the jaclsh.bat file but my java program would not compile as it was not able to find the tcl.lang.* package. (I first tried using the code on the Get Started page but to no avail) Only after compiling the source files and then copying the tcl folder to the same location as my test file was I able to compile a small program that imports the tcl.lang package and creates a Interp instance - printing an 'OK' message one it's done that. When I run the program however it returns the error... Exception in thread "main" java.lang.NoClassDefFoundError: tcl/lang/TclRuntimeError at testImport.main(testImport.java:7). I couldn't find the class mentioned in the source release so googled the error and file name and found a TclRuntimeException.java file here: http://www.koders.com/java/fidBA376262E5B86423A1B6795FAF916127813F7342.aspx However after compiling and integrating this the error changed to saying that the TclException class was missing... as well as TclInteger among others. Are these known problems? Is there a fix? Why are these files missing in the first place? What I would really appreciate is someone guiding me through the installation, setup and use of Jacl on a Windows XP system if that is at all possble. Please? :) Background: I am a Third year Computer Science & A.I. student at the University of Sheffield, UK.. For my dissertation I am creating an API that will allow users to create Java based interfaces and interact with a tcl-based program that maps audio input to a 2d x,y positions on a screen using an Artifcial Neural Network. Jacl seems the most obvious tool for helping me acheive this. Any help much appreciateed, Richard Shaw |
From: Patrick F. <pfi...@oz...> - 2007-03-05 20:00:38
|
. I jarred up tcllib but I can't get it to work . jar -cvf tcllib1.8.jar tcllib1.8 C:\Tcl\lib>java -classpath tcllib1.8.jar tcl.lang.Shell % set auto_path resource:/tcl/lang/library % lappend auto_path resource:/tcllib1.8 resource:/tcl/lang/library resource:/tcllib1.8 % package names java Itcl Tcl TJC parser tcltest % package require autoproxy can't find package autoproxy % package require csv can't find package csv % lappend auto_path resource:/tcllib1.8/ftp resource:/tcl/lang/library resource:/tcllib1.8 resource:/tcllib1.8/ftp % package require ftp can't find package ftp __ Sent with SnapperMail www.snappermail.com |
From: Mo D. <mo...@mo...> - 2007-03-02 23:31:50
|
Patrick Finnegan wrote: > Does "package require" work in JACL? The auto_path variable is initialised > to /tcl/lang/library which is part of the jacl.jar file. If say for example > I jarred up pure tcl packages into tclpakages.jar and lappended the location > to auto_path. Would package require load the packages? > If your jar file was added to the CLASSPATH then it should be loaded. You need to lappend "resource:/whatever/path/prefix" to get it to work. Mo DeJong |
From: Virden, L. W. <lv...@ca...> - 2007-03-02 20:21:11
|
Wouldn't running the Tcl 8.4 test suite against Jacl show you which commands were divergent from 8.4, for the most part? --=20 <URL: http://wiki.tcl.tk/ > Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. <URL: mailto:lv...@gm... > <URL: http://www.purl.org/NET/lvirden/ > =20 |
From: Tom P. <tpo...@ny...> - 2007-03-02 17:49:19
|
On Tue, Feb 27, 2007 at 05:03:35PM +0000, Patrick Finnegan wrote: > > Using jacl 1.4. "- all" is not a valid option for lsearch. What version > of Tcl corresponds to JACL. Anything more recent than 8.0. > > bad option "-all": must be -ascii, -decreasing, -dictionary, -exact, > -increasing, -integer, -glob, -real, -regexp, or -sorted > while executing > "lsearch -all $serverList "*ManagedProcess*" " > invoked from within > "set jvmList [ lsearch -all $serverList "*ManagedProcess*" ]" > (procedure "stopServers" line 48) > invoked from within I believe it mostly 8.0, with some commands having 8.0 - 8.4 features. On my to-do list is auditing Jacl commands vis-a-vis Tcl 8.4, and coming up with a list of commands to implement or enhance to 8.4 levels. I figure if *we* (the collective, but relatively very small community of Jacl users) attack one or two commands each, we can bring Jacl up to 8.4 compliance. 'fileevent' and a newer 'regexp/regsub' are probably the most difficult. Mo - if you already have such a list, please post. Who else is willing to volunteer? -- Tom Poindexter tpo...@ny... |
From: Patrick F. <pfi...@oz...> - 2007-03-02 16:17:29
|
Using jacl 1.4. "- all" is not a valid option for lsearch. What version of Tcl corresponds to JACL. Anything more recent than 8.0. bad option "-all": must be -ascii, -decreasing, -dictionary, -exact, -increasing, -integer, -glob, -real, -regexp, or -sorted while executing "lsearch -all $serverList "*ManagedProcess*" " invoked from within "set jvmList [ lsearch -all $serverList "*ManagedProcess*" ]" (procedure "stopServers" line 48) invoked from within |
From: Patrick F. <pfi...@oz...> - 2007-02-26 22:31:29
|
Does "package require" work in JACL? The auto_path variable is initialised to /tcl/lang/library which is part of the jacl.jar file. If say for example I jarred up pure tcl packages into tclpakages.jar and lappended the location to auto_path. Would package require load the packages? |
From: Wei D. <wd...@fn...> - 2007-02-19 07:49:29
|
Hi Mo, Just got a chance to try it out, it seems that the cancellation only takes effect for a loop, so the following case did not work: 1. Cancellation of single command such as After 10000 did not work. 2. Cancellation of a proc: if the proc contains a loop ( I tried while loop ), it will break out of the while loop and return from the proc immediately, but if there is no while loop, it will continue executing all the remaining statement/command in the proc as if there is no cancellation. 3. Why TclEvent.sync() API implementation eats InterruptedException : while (!isProcessed) { try { wait(0); } catch (InterruptedException e) { continue; =20 } } Are those known issues/limitations or am I missing something here? Thanks a lot for your advice Wei -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] On Behalf Of Mo DeJong Sent: Tuesday, February 06, 2007 6:18 PM To: tcl...@li... Subject: Re: [tcljava-user] JACL eval cancellation Wei Dai wrote: > > HI, > > =20 > > Is it possible that an eval command can be cancelled during its=20 > execution? It does not seem to have any API to do this, but I wonder=20 > if there is way to achieve this in the current JACL implementation,=20 > e.g Can I use Interp.setInterrupted to achieve this? > > =20 > Yes, please read: http://tcljava.cvs.sourceforge.net/*checkout*/tcljava/tcljava/docs/Topic s/SetInterrupted.html Mo DeJong ------------------------------------------------------------------------ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Mo D. <mo...@mo...> - 2007-02-07 02:17:35
|
Wei Dai wrote: > > HI, > > > > Is it possible that an eval command can be cancelled during its > execution? It does not seem to have any API to do this, but I wonder > if there is way to achieve this in the current JACL implementation, > e.g Can I use Interp.setInterrupted to achieve this? > > > Yes, please read: http://tcljava.cvs.sourceforge.net/*checkout*/tcljava/tcljava/docs/Topics/SetInterrupted.html Mo DeJong |
From: Mo D. <mo...@mo...> - 2007-02-06 20:13:34
|
Amier wrote: > Hi There. > > First of all thank you for all your hard work in creating this interface. > I've been trying to understand how TCLBlend work but having some > difficulty in compiling it and making it work with our existing > application platform > > Basically, I need to to make use of tcl83 (active state) and java 1.4.2 If you are going to make use of the Active State binary then you need to compile Tcl Blend with the existing binary and make sure the Active State Tcl binary was compiled with thread support enabled. But, I would not suggest that approach. I would suggest that you use the Tcl Blend binary that I just posted to the list a couple of days ago and see if that works for you. I hope that helps Mo DeJong |