tcljava-user Mailing List for Tcl/Java (Page 45)
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: Larry W. V. <lv...@ca...> - 2001-06-12 17:52:01
|
Just a note for those of you who may not be aware, the 8th Tcl Conference is being held July 23-27 in San Diego, CA, as part of the O'Reilly Open Source Convention. This represents a continuation of the Tcl Conference that USENIX has sponsored in the past. If you have ever been to a Tcl conference in the past, you'll know it's both fun and enlightening to share experiences with other Tcl enthusiasts. All skill levels are welcome; the tutorials presented this year cover both beginner and advanced levels. Check out the full schedule at the web site: http://conferences.oreilly.com/oscon/ -- Never apply a Star Trek solution to a Babylon 5 problem. Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: Larry W. V. <lv...@ca...> - 2001-06-12 15:33:44
|
I downloaded tcljava from the nightly-cvs tar files at ftp.scriptics.com . I'm confused about building this though. The readme.jacl says that I need to cd into the unix directory. I do that and the readme there says to do ./configure . There is no configure in that directory. Is there something missing from the nightly cvs tar files? -- Never apply a Star Trek solution to a Babylon 5 problem. Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: Dan S. <sc...@is...> - 2001-05-29 13:29:18
|
It was a simple matter of changing this line in the configure script: # DIR=$JAVA_DIR/jre/$ARCH_LIB/classic DIR=$JAVA_DIR/jre/$ARCH_LIB The classic sub directory does not exist in Sun's JDK 1.3.1. All the needed libraries are one level up. Dan -----Original Message----- From: tcl...@li... [mailto:tcl...@li...]On Behalf Of Mo DeJong Sent: Sunday, May 27, 2001 4:49 PM To: tcl...@li... Subject: Re: [tcljava-user] TclBlend and Java1.3 (SDK2) On Fri, 25 May 2001, Dan Schenck wrote: > I was trying to configure TclBlend1.2.6 to use Java1.3 and am having the following error: > > configure: error: jdk directory /usr/java1.3/jre/lib/sparc/classic does not exist > > Is it not possible to use TclBlend1.2.6 with Java1.3? If it is possible, what tweaks do I need to > make to get there. It does work, but you might need to modify the configure.in script so that it knows about where the JNI libs sit on the filesystem. There was quite a bit of work done on the version of Tcl Blend in the CVS to make this easier, you might want to try that. You should also be able to just hack the generated Makefile to fix the paths passed to the compiler. JDK vendors have this fun habbit of changing the install path names for just about every major release. Mo _______________________________________________ tcljava-user mailing list tcl...@li... http://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Mo D. <md...@cy...> - 2001-05-27 21:48:35
|
On Fri, 25 May 2001, Dan Schenck wrote: > I was trying to configure TclBlend1.2.6 to use Java1.3 and am having the following error: > > configure: error: jdk directory /usr/java1.3/jre/lib/sparc/classic does not exist > > Is it not possible to use TclBlend1.2.6 with Java1.3? If it is possible, what tweaks do I need to > make to get there. It does work, but you might need to modify the configure.in script so that it knows about where the JNI libs sit on the filesystem. There was quite a bit of work done on the version of Tcl Blend in the CVS to make this easier, you might want to try that. You should also be able to just hack the generated Makefile to fix the paths passed to the compiler. JDK vendors have this fun habbit of changing the install path names for just about every major release. Mo |
From: D. J. H. <dha...@mi...> - 2001-05-26 16:32:29
|
Tam Huynh wrote: > I tried loading the extension in the java program with > 'interp.eval("load ext.dll")'. Does the tclsh have to > call the java program in order for this to work? I'm > executing the program without running the tclsh. And > my exception is "invalid command load" This sounds very much like you are using Jacl, which will return that error message when the load command is called. Since Jacl doesn't know anything about C-based Tcl extensions, the load command has not been implemented there. I am not very familiar with instantiating a C-based Tcl interp from Java code using TclBlend, so I really can't help you there... -=- D. J. |
From: Dan S. <sc...@is...> - 2001-05-25 14:06:23
|
I was trying to configure TclBlend1.2.6 to use Java1.3 and am having the following error: configure: error: jdk directory /usr/java1.3/jre/lib/sparc/classic does not exist Is it not possible to use TclBlend1.2.6 with Java1.3? If it is possible, what tweaks do I need to make to get there. Thanks, Dan ================================================= Dan Schenck mailto:sc...@is... Technical Principal The Information Store http://www.istore.com 10777 Westheimer, Suite 1040 Houston, TX 77042 Ph: 713 787-6798 x166 Fax: 713 787-6772 ================================================= |
From: Tam H. <th...@su...> - 2001-05-24 16:32:40
|
I tried loading the extension in the java program with 'interp.eval("load = ext.dll")'. Does the tclsh have to call the java program in order for this = to work? I'm executing the program without running the tclsh. And my = exception is "invalid command load" On 5/23/01, tcljava-user wrote: >Tam Huynh wrote: >> = >> Well see this is my problem for tclblend..the function gcd is in the = >> C tcl extension. > >If gcd is a C-based Tcl extension, then load it *exactly* the same >way that you did in tclsh. Tclblend is simply a tclsh with the = >"java" extension. You still have all normal Tcl commands available >to you, called exactly the same way. Tclblend's "java" extension >simply adds the commands that begin java::*. You should only = >use the java::* commands to talk to Java classes, not to anything >in C or C++. > > -=3D- D. J. > >_______________________________________________ >tcljava-user mailing list >tcl...@li... >http://lists.sourceforge.net/lists/listinfo/tcljava-user > > >RFC822 header >----------------------------------- > Received: from usw-sf-list1.sourceforge.net (usw-sf-fw2.sourceforge.net = >[216.136.171.252]) by big.sunrisetelecom.com with SMTP (Microsoft = >Exchange Internet Mail Service Version 5.5.2653.13) > id LP9FGY7F; Wed, 23 May 2001 22:13:24 -0700 > Received: from localhost ([127.0.0.1] helo=3Dusw-sf-list1.sourceforge.= net) > by usw-sf-list1.sourceforge.net with esmtp (Exim 3.22 #1 = >(Debian)) > id 152nUb-0006D0-00; Wed, 23 May 2001 22:17:01 -0700 > Received: from [63.165.195.154] (helo=3Dwcox.com) > by usw-sf-list1.sourceforge.net with esmtp (Exim 3.22 #1 = >(Debian)) > id 152nU0-00069h-00 > for <tcl...@li...>; Wed, 23 May 2001 = >22:16:24 -0700 > Received: from cayenne.sdr.local [63.165.196.10] by wcox.com with = >ESMTP > (SMTPD32-6.06) id A922A81011A; Wed, 23 May 2001 23:16:18 - >0600 > Received: from millibits.com (poblano [192.168.10.72]) > by cayenne.sdr.local (8.9.3/8.9.3) with ESMTP id FAA02484 > for <tcl...@li...>; Thu, 24 May 2001 = >05:09:14 GMT > Message-ID: <3B0...@mi...> > From: "D. J. Hagberg" <dha...@mi...> > Organization: Millibits Consulting Services > X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.11 i586) > X-Accept-Language: en > MIME-Version: 1.0 > To: tcl...@li... > Subject: Re: [tcljava-user] mail group > References: <E15...@us...> > Content-Type: text/plain; charset=3Dus-ascii > Content-Transfer-Encoding: 7bit > Sender: tcl...@li... > Errors-To: tcl...@li... > X-BeenThere: tcl...@li... > X-Mailman-Version: 2.0.5 > Precedence: bulk > Reply-To: tcl...@li... > X-Reply-To: dha...@mi... > List-Help: <mailto:tcljava-user- >re...@li...?subject=3Dhelp> > List-Post: <mailto:tcl...@li...> > List-Subscribe: <http://lists.sourceforge.net/lists/listinfo/tcljava-= user>, > <mailto:tcljava-user- >re...@li...?subject=3Dsubscribe> > List-Id: A list for users of tcljava <tcljava-user.lists.sourceforge.net>= > List-Unsubscribe: <http://lists.sourceforge.net/lists/listinfo/tcljava- >user>, > <mailto:tcljava-user- >re...@li...?subject=3Dunsubscribe> > List-Archive: <http://lists.sourceforge.net/archives//tcljava-user/> > Date: Thu, 24 May 2001 05:09:46 +0000 > = > |
From: D. J. H. <dha...@mi...> - 2001-05-24 05:16:24
|
Tam Huynh wrote: > > Well see this is my problem for tclblend..the function gcd is in the > C tcl extension. If gcd is a C-based Tcl extension, then load it *exactly* the same way that you did in tclsh. Tclblend is simply a tclsh with the "java" extension. You still have all normal Tcl commands available to you, called exactly the same way. Tclblend's "java" extension simply adds the commands that begin java::*. You should only use the java::* commands to talk to Java classes, not to anything in C or C++. -=- D. J. |
From: Tam H. <th...@su...> - 2001-05-24 00:26:48
|
Well see this is my problem for tclblend..the function gcd is in the C tcl = extension. I think i'm making it more complicated than it needs to be. I = couldn't source a script which does "load gcd.dll" or load .dll in a java = program with interp.eval("load gcd.dll") since both keeps saying "invalid = command name "load." I know this should work since you said tclblend is = a C tcl extension. = So then i thought of just sourcing a script which loads it as part of a jav= a class. I test it in the tclsh and the extension is loaded and function = is access with "gcd 42 105" But i can't access the extension function "= gcd 42 105" if i'm calling the script from a java program because the = error again is "invalid command name gcd" = Please help.. On 5/23/01, tcljava-user wrote: >On Wed, 23 May 2001, Tam Huynh wrote: > >> Is this the only mail group to join for help on tclblend? > >No, the lists are for both Jacl and Tcl Blend. > >> Is there any of >> other mail group for beginners? Well i'm just going to ask my = >beginner's >> question anyway..I just need to know how to call a method/function = >that is >> contain in a c extension loaded in a class. > >I assume you mean a Java extension. > >> I get "no such method gcd in >> class SimpleExtension" in my script and gcd is the function loaded in = >the >> dll.. > >Well, is there a public method named gcd? You can query the available >methods using the `java::info methods $obj` command. You could also >print them using javap. > >Mo > >_______________________________________________ >tcljava-user mailing list >tcl...@li... >http://lists.sourceforge.net/lists/listinfo/tcljava-user > > >RFC822 header >----------------------------------- > Received: from usw-sf-list1.sourceforge.net (usw-sf-fw2.sourceforge.net = >[216.136.171.252]) by big.sunrisetelecom.com with SMTP (Microsoft = >Exchange Internet Mail Service Version 5.5.2653.13) > id LP9FGYH7; Wed, 23 May 2001 16:40:15 -0700 > Received: from localhost ([127.0.0.1] helo=3Dusw-sf-list1.sourceforge.= net) > by usw-sf-list1.sourceforge.net with esmtp (Exim 3.22 #1 = >(Debian)) > id 152iIM-00041A-00; Wed, 23 May 2001 16:44:02 -0700 > Received: from runyon.cygnus.com ([205.180.230.5] = >helo=3Dcygnus.com) > by usw-sf-list1.sourceforge.net with esmtp (Exim 3.22 #1 = >(Debian)) > id 152iHn-0003tc-00 > for <tcl...@li...>; Wed, 23 May 2001 = >16:43:27 -0700 > Received: from cse.cygnus.com (cse.cygnus.com [205.180.230.236]) > by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id = >QAA28394 > for <tcl...@li...>; Wed, 23 May 2001 = >16:43:22 -0700 (PDT) > Received: (mdejong@localhost) by cse.cygnus.com (8.8.8+Sun/8.6.4) = >id QAA02957; Wed, 23 May 2001 16:43:22 -0700 (PDT) > From: Mo DeJong <md...@cy...> > To: tcl...@li... > Subject: Re: [tcljava-user] mail group > In-Reply-To: = ><DGE...@su... >> > Message-ID: = ><Pin...@cs...> > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=3DUS-ASCII > Sender: tcl...@li... > Errors-To: tcl...@li... > X-BeenThere: tcl...@li... > X-Mailman-Version: 2.0.5 > Precedence: bulk > Reply-To: tcl...@li... > List-Help: <mailto:tcljava-user- >re...@li...?subject=3Dhelp> > List-Post: <mailto:tcl...@li...> > List-Subscribe: <http://lists.sourceforge.net/lists/listinfo/tcljava-= user>, > <mailto:tcljava-user- >re...@li...?subject=3Dsubscribe> > List-Id: A list for users of tcljava <tcljava-user.lists.sourceforge.net>= > List-Unsubscribe: <http://lists.sourceforge.net/lists/listinfo/tcljava- >user>, > <mailto:tcljava-user- >re...@li...?subject=3Dunsubscribe> > List-Archive: <http://lists.sourceforge.net/archives//tcljava-user/> > Date: Wed, 23 May 2001 16:43:22 -0700 (PDT) > = > |
From: Mo D. <md...@cy...> - 2001-05-23 23:43:27
|
On Wed, 23 May 2001, Tam Huynh wrote: > Is this the only mail group to join for help on tclblend? No, the lists are for both Jacl and Tcl Blend. > Is there any of > other mail group for beginners? Well i'm just going to ask my beginner's > question anyway..I just need to know how to call a method/function that is > contain in a c extension loaded in a class. I assume you mean a Java extension. > I get "no such method gcd in > class SimpleExtension" in my script and gcd is the function loaded in the > dll.. Well, is there a public method named gcd? You can query the available methods using the `java::info methods $obj` command. You could also print them using javap. Mo |
From: Tam H. <th...@su...> - 2001-05-23 23:34:07
|
Is this the only mail group to join for help on tclblend? Is there any of other mail group for beginners? Well i'm just going to ask my beginner's question anyway..I just need to know how to call a method/function that is contain in a c extension loaded in a class. I get "no such method gcd in class SimpleExtension" in my script and gcd is the function loaded in the dll.. /*tcl script*/ package require java set loadobj [java::load -classpath . SimpleExtension] set obj [java::new SimpleExtension] set x [java::new Integer 42] set y [java::new Integer 105] set g [$obj gcd $x $y] |
From: Marty B. <mar...@bo...> - 2001-05-22 20:21:14
|
configure appears to work fine, but make fails early on in the compile process. I'll probably just forgo trying to get it to work on x86. Thanks anyway. Marty Please respond to tcl...@li... Sent by: tcl...@li... To: tcl...@li... cc: Subject: Re: [tcljava-user] Building on Solaris x86? On Tue, 22 May 2001, Marty Backe wrote: > Has anyone successfully built TclBlend on Solaris 8 for Intel. I tried > both the 1.2.6 release and the latest cvs release, but it appears > severely broken. Do you mean that the build is broken or that the .so it creates is broken? I have no doubt you are going to run into build problems since I doubt anyone has ever tried it on x86 Solaris. > At work this is not a problem since it builds fine on > Sparc Solaris, but I do work from home periodically, where I use my > Intel Solaris 8 server. Usually I have no problems building software on > either platform. > > I determined at least one fix for 1.2.6, but I don't see any reason for > submitting a bug fix since the build process for the latest cvs is > substantially different. Is this a true assumption. Are build related > bug fixes for 1.2.6 of any interest? If you need to make changes to the build process, you should grab the CVS version. The 1.2 branch is not really worked on anymore. 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-05-22 20:12:35
|
On Tue, 22 May 2001, Marty Backe wrote: > Has anyone successfully built TclBlend on Solaris 8 for Intel. I tried > both the 1.2.6 release and the latest cvs release, but it appears > severely broken. Do you mean that the build is broken or that the .so it creates is broken? I have no doubt you are going to run into build problems since I doubt anyone has ever tried it on x86 Solaris. > At work this is not a problem since it builds fine on > Sparc Solaris, but I do work from home periodically, where I use my > Intel Solaris 8 server. Usually I have no problems building software on > either platform. > > I determined at least one fix for 1.2.6, but I don't see any reason for > submitting a bug fix since the build process for the latest cvs is > substantially different. Is this a true assumption. Are build related > bug fixes for 1.2.6 of any interest? If you need to make changes to the build process, you should grab the CVS version. The 1.2 branch is not really worked on anymore. Mo DeJong Red Hat Inc |
From: Marty B. <mar...@bo...> - 2001-05-22 15:45:47
|
Has anyone successfully built TclBlend on Solaris 8 for Intel. I tried both the 1.2.6 release and the latest cvs release, but it appears severely broken. At work this is not a problem since it builds fine on Sparc Solaris, but I do work from home periodically, where I use my Intel Solaris 8 server. Usually I have no problems building software on either platform. I determined at least one fix for 1.2.6, but I don't see any reason for submitting a bug fix since the build process for the latest cvs is substantially different. Is this a true assumption. Are build related bug fixes for 1.2.6 of any interest? Any feedback would be appreciated. Thanks, Marty |
From: Mo D. <md...@cy...> - 2001-05-20 21:44:52
|
On Tue, 15 May 2001, Blankenship, David wrote: > OS: Windows 2000 > JDK: Sun JDK 1.3 > JACL: pulled from CVS May 14, 2001 > > I have been using Jacl 1.2.6. The other day I ran into a problem with the > reflect object table and hash codes. I noticed that this problem had been > fixed last July, so I decided to get the latest source from CVS. > > I built the source using Jakarta ORO 2.0.1. I went to run my application and > got the following exception: I am not sure what you need the ORO code for. Jacl 1.3 has a new implementation of the regexp command that does not depend on the ORO lib. > java.lang.IllegalAccessError: try to access method > tcl.lang.Interp.dispose()V from class > com.klatencor.catalyst.gap.control.JaclStrategyAction > > I noticed that dispose is now part of EventuallyFreed, and the dispose > method is declared at package scope. Humm, that does seem off. Christian, could you comment on how this? Should the dispose() method in the EventuallyFreed superclass be public? > To work around this problem, I did two things. First, I added a dispose > method to Interp that called super.dispose(). When I did this, I got the > following exception. > > java.lang.NullPointerException > at tcl.lang.NamespaceCmd.findCommand(NamespaceCmd.java:1775) > at tcl.lang.Interp.deleteCommand(Interp.java:1546) > at tcl.lang.ReflectObject.dispose(ReflectObject.java:612) > at tcl.lang.TclObject.release(TclObject.java:211) > at tcl.lang.Interp.resetResult(Interp.java:2088) > at tcl.lang.Interp.eventuallyDispose(Interp.java:564) > at tcl.lang.EventuallyFreed.dispose(EventuallyFreed.java:130) > at tcl.lang.Interp.dispose(Interp.java:432) Humm, that is odd. This seems to be in the new code related to interp resolvers. if (cxtNs.resolver != null || interp.resolvers != null) { Could you try to create a test case that reproduces this exception? This is new code so it may have some edge cases that need to be tested. > Second, I removed the call to Interp.dispose from my application. When I ran > the application, noticed that the memory of the application seems to > continue to grow. My application normally hovers around 29 Meg. When run > with Jacl 1.3 without the Interp.dispose call, I have let it grow to over 50 > Meg without slowing down on the memory growth. I think you need those dispose() calls in there. > What's the status of the Interp.dispose call? Is it still user callable? Did > I just build the wrong code, or build it incorrectly? If I manage to get rid > of the NullPointerException should that solve my problem? I think we need to make the dispose method public. It seems to have been public in the 1.2 version so I think we need to fix that. Mo |
From: Mo D. <md...@cy...> - 2001-05-20 21:03:39
|
On Sun, 20 May 2001, Jesus M. Salvo Jr. wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > My apologies to everyone on the list ( and to Mo ). I was using the mail > gateway to my mailbox at work, and apparently there was no option to turn on > or off HTML formatting ... and all the while I thought things were being sent > as plain text. So I am sending the questions again using a new subscription > with my home e-mail address. > > I am a Java developer, with some basic knowledge of Tcl. I am intersted > mainly in Tcl calling Java methods. In the end, I want to use it with > Vignette's StoryServer. > > I have recently downloaded and tried TclBlend on both linux and Solaris, and > they worked as expected. > > However, I still have some few questions that I cannot find in the FAQ. > > 1) In the man page for "package require java", it said that "Tcl will create > a JVM in Tcl's process space". What does this exactly mean? In both linux and > solaris, when I call "package require java" in a Tcl shell, I cannot see a > java process runnning ( even with linux's "ps axf" command ). That is because the Tcl process loads the JVM shared libs into the Tcl process and creates a JVM in the same process. There would only be one process at that point. > To be honest, I > was expecting a Java process somehow as a child of the tcl process, but that > does not seem to be the case. What are the differences ( and implications ) > between what I was expecting and what tclblend actually does? Using two processes would mean that Tcl <-> Java communication would be slow since IPC would be required. Also, why would you want to do that when the JNI api is already a standard part of Java? > D.J.: You mentioned that they would show as child processes with linux's "ps" > command. However, I tried that several times .... within a tclsh just after > "package require java", after a "[java::new ]" .... and I do not see such > child processes. > > > 2) How many JVMs are created within the lifetime of the tcl process? For > example, if multiple tcl scripts have a "package require java" as the first > line of each of the script, will each call to "package require java" create a > new JVM? There is only 1 JVM. > 3) This last question maybe a bit offtopic ... but with StoryServer ( SS ), a > SS template can be called multiple times by different browsers at the same > time ( multi-threaded ). Within Vignette's installation page for TclBlend, > the TclBlend binary distribution does not seem to be any different ( e.g.: no > proprietary extension seems to be required or installed to make TclBlend work > with SS ). With this regard ( threading ), will each call to the templatec > reate a separate JVM? > > Probably a better way to ask question [3] is: If I was doing threading in > Tcl, will each thread run its own JVM? There is only 1 JVM, multiple threads can talk to the JVM in a thread safe way. If you are dealing with threads, the 1.3 dev version in the CVS is the only way to go. It includes a lot of threading changes that fix some of the more nasty problems in the 1.2 series. Of course, 1.3 is not yet ready for prime time. More testing of the thread changes is needed before it can be called "stable". If folks are interested in speeding up the "stable" release, by all means get involved in the 1.3 development process. Mo |
From: D. J. H. <dha...@mi...> - 2001-05-20 16:57:52
|
"Jesus M. Salvo Jr." wrote: > D.J.: You mentioned that they would show as child processes with linux's "ps" > command. However, I tried that several times .... within a tclsh just after > "package require java", after a "[java::new ]" .... and I do not see such > child processes. Only if you start creating/running threads in the Java code. E.g., --------- TestThread.java --------------- public class TestThread implements Runnable { private boolean flag_ = true; private boolean interrupted_ = false; public void run() { while( !interrupted_ ) { System.out.println(flag_ ? "Tick" : "Tock"); System.out.flush(); flag_ = !flag_; try { Thread.sleep(1000L); } catch( InterruptedException ex ) { interrupted_ = true; } } } } ------------------------------------------ javac TestThread.java jtclsh package require java set tt [java::new Thread [java::new TestThread]] $tt start And now, on Linux, if your JVM is set to use native threads, you'll see a child process off your jtclsh process. If your JVM is set to use green threads, you will still only see one process. (on linux, green threads are a *lot* less resource intensive on a single-processor box). Hopefully Mo can answer your other questions, but some of it can really only be answered through tests. For instance, create two interps in tclsh, package require java into both of them, and then do something like: java::call System setProperty interp1prop Hi System properties are exclusive per VM, so if, in fact, there were two VMs created, the second interp would not be able to find the property you set in the first interp. With TclJava 1.2.6, this does not appear to be the case: % java::call System setProperty interp1prop Hi % % set ni [interp create] interp0 % $ni eval "package require java" 1.2.6 % $ni eval {java::call System getProperty interp1prop} Hi I don't have a thread-enabled Tcl to perform a similar test with threads, but perhaps you could do so with the interp that comes with Vignette? Hope this helps, -=- D. J. |
From: Jesus M. S. Jr. <jm...@ih...> - 2001-05-20 03:19:42
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 My apologies to everyone on the list ( and to Mo ). I was using the mail gateway to my mailbox at work, and apparently there was no option to turn on or off HTML formatting ... and all the while I thought things were being sent as plain text. So I am sending the questions again using a new subscription with my home e-mail address. I am a Java developer, with some basic knowledge of Tcl. I am intersted mainly in Tcl calling Java methods. In the end, I want to use it with Vignette's StoryServer. I have recently downloaded and tried TclBlend on both linux and Solaris, and they worked as expected. However, I still have some few questions that I cannot find in the FAQ. 1) In the man page for "package require java", it said that "Tcl will create a JVM in Tcl's process space". What does this exactly mean? In both linux and solaris, when I call "package require java" in a Tcl shell, I cannot see a java process runnning ( even with linux's "ps axf" command ). To be honest, I was expecting a Java process somehow as a child of the tcl process, but that does not seem to be the case. What are the differences ( and implications ) between what I was expecting and what tclblend actually does? D.J.: You mentioned that they would show as child processes with linux's "ps" command. However, I tried that several times .... within a tclsh just after "package require java", after a "[java::new ]" .... and I do not see such child processes. 2) How many JVMs are created within the lifetime of the tcl process? For example, if multiple tcl scripts have a "package require java" as the first line of each of the script, will each call to "package require java" create a new JVM? 3) This last question maybe a bit offtopic ... but with StoryServer ( SS ), a SS template can be called multiple times by different browsers at the same time ( multi-threaded ). Within Vignette's installation page for TclBlend, the TclBlend binary distribution does not seem to be any different ( e.g.: no proprietary extension seems to be required or installed to make TclBlend work with SS ). With this regard ( threading ), will each call to the templatec reate a separate JVM? Probably a better way to ask question [3] is: If I was doing threading in Tcl, will each thread run its own JVM? Thanks in advance, John Salvo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjsHOM8ACgkQAvd5SY4qWYytlQCfbqVimwODLi4TPmN1+/vbRf8g Rg8AnisscblwHlF/x65NwXW7K1+38dqU =VsBu -----END PGP SIGNATURE----- |
From: Mo D. <md...@cy...> - 2001-05-19 19:05:58
|
On Sat, 19 May 2001, John Salvo wrote: ... John, please do not post to this list in HTML. It is strictly forbidden. Fix your mail client so that it sends plain text and try your post again. Mo DeJong Red Hat Inc |
From: D. J. H. <dha...@mi...> - 2001-05-19 16:51:56
|
> John Salvo wrote: > 1) In the man page for "package require java", it said that "Tcl will > create a JVM in Tcl's process space". What does this exactly mean? In > both linux and solaris, when I call "package require java" in a Tcl > shell, I cannot see a java process runnning ( even with linux's "ps > axf" command ). To be honest, I was expecting a Java process somehow > as a child of the tcl process, but that does not seem to be the case. > What are the differences ( and implications ) between what I was > expecting and what tclblend actually does? >From the perspective of TclBlend, the JVM is loaded as a shared library into Tcl's address space, some data structures and C function pointers are initialized, and the C side of things can start calling into the Java side of things to load classes, call methods, and potentially start threads. On linux, as threads get started, they would show put with "ps" as child processes. On Solaris, threads are totally internal to the process that created them, not visible with ps, so you'd need to use a tool like /usr/proc/bin/pstack, a thread-aware debugger, or some other tool to see them. > 2) How many JVMs are created within the lifetime of the tcl process? > For example, if multiple tcl scripts have a "package require java" as > the first line of each of the script, will each call to "package > require java" create a new JVM? I believe it would be one JVM for the one process. I think the only other possibility would be one JVM per interp. Mo? [ . . . ] > Probably a better way to ask question [3] is: If I was doing threading > in Tcl, will each thread run its own JVM? Well, that depends on the answer to 2, which I'm not very sure of... -=- D. J. |
From: John S. <JS...@Po...> - 2001-05-19 05:51:17
|
I am a Java developer, with some basic knowledge of Tcl. I am intersted mainly in Tcl calling Java methods. In the end, I want to use it with Vignette's StoryServer. I have recently downloaded and tried TclBlend on both linux and Solaris, and they worked as expected. However, I still have some few questions that I cannot find in the FAQ. 1) In the man page for "package require java", it said that "Tcl will create a JVM in Tcl's process space". What does this exactly mean? In both linux and solaris, when I call "package require java" in a Tcl shell, I cannot see a java process runnning ( even with linux's "ps axf" command ). To be honest, I was expecting a Java process somehow as a child of the tcl process, but that does not seem to be the case. What are the differences ( and implications ) between what I was expecting and what tclblend actually does? 2) How many JVMs are created within the lifetime of the tcl process? For example, if multiple tcl scripts have a "package require java" as the first line of each of the script, will each call to "package require java" create a new JVM? 3) This last question maybe a bit offtopic ... but with StoryServer ( SS ), a SS template can be called multiple times by different browsers at the same time ( multi-threaded ). Within Vignette's installation page for TclBlend, the TclBlend binary distribution does not seem to be any different ( e.g.: no proprietary extension seems to be required or installed to make TclBlend work with SS ). With this regard ( threading ), will each call to the template create a separate JVM? Probably a better way to ask question [3] is: If I was doing threading in Tcl, will each thread run its own JVM? Thanks in advance, John Salvo |
From: Tam H. <th...@su...> - 2001-05-18 01:18:19
|
Thanks Mo for the exception handling. But the load didn't work in the main application itself, so i tried calling in a separate java file instead. Ok so why does my java application result in an exception whenever the simple.tcl call the command "test". The gcd function should be already loaded since my "load" was executed. Why is this not the case? This script execute fine in the tclsh but the main java program does not when i tried calling the simple.tcl. What i'm doing wrong or not understanding? exception: invalid command "test" /*main java program Demo1.java using Forte for Java*/ public static void main(String args[]) { try { String myfile = "source d:/Tcl83/lib/test/simple.tcl"; Interp newInterp = new Interp(); newInterp.eval(myfile); newInterp.dispose(); } catch(TclException e) { int code = e.getCompletionCode(); if(code == TCL.ERROR) { System.err.println(newInterp.getResult().toString()); } else { System.err.println("command return bad" + code); } } } /*SimpleExtension.java*/ import tcl.lang.*; public class SimpleExtension extends Extension { public void init(Interp interp) { interp.createCommand("test", new testex()); } } /*testex.java*/ import tcl.lang.*; class testex implements Command { public void cmdProc(Interp interp, TclObject argv[]) throws TclException { interp.eval("load " + "example.dll"); } } /*simple.tcl*/ package require java java::load -classpath . SimpleExtension test set f "log.txt" set out [open $f w] set x 42 set y 105 set g [gcd $x $y] puts $out $g close $out |
From: Mo D. <md...@cy...> - 2001-05-16 23:55:42
|
On Tue, 15 May 2001, Tam Huynh wrote: > Please bear with me, i'm just learning this... > I have set my classpath env var for tclblend.jar and tcljava.jar so why ami > i getting this error? My tcl script should be able to call the C function > once it is loaded right? > > Thanks again for any help.. > > public static void main(String args[]) > { > try > { > String myfile = "d:/Tcl83/bin/example.tcl"; > Interp newInterp = new Interp(); > newInterp.eval("load " + "d:/tcl83/lib/example.dll"); > newInterp.evalFile(myfile); > newInterp.dispose(); > } > } > > ERRORS: > > tcl.lang.TclException > tcl.lang.TclException > at tcl.lang.ReturnCmd.cmdProc(ReturnCmd.java) > at tcl.lang.Parser.evalObjv(Parser.java) > at tcl.lang.Parser.eval2(Parser.java) > at tcl.lang.Procedure.cmdProc(Procedure.java) > at tcl.lang.Parser.evalObjv(Parser.java) > at tcl.lang.Parser.evalObjv(Parser.java) > at tcl.lang.Parser.eval2(Parser.java) > at tcl.lang.Interp.eval(Interp.java) > at tcl.lang.Interp.eval(Interp.java) > at Demo1.main(Demo1.java:1003) You need to deal with a return in the calling code, the way Tcl exceptions are mapped to Java exception demand it. Here is a quick snip from src/jacl/tcl/lang/Shell.java. try { interp.evalFile(fileName); } catch (TclException e) { int code = e.getCompletionCode(); if (code == TCL.RETURN) { code = interp.updateReturnInfo(); if (code != TCL.OK) { System.err.println("command returned bad code: " + code); } } else if (code == TCL.ERROR) { System.err.println(interp.getResult().toString()); } else { System.err.println("command returned bad code: " + code); } Mo |
From: Tam H. <th...@su...> - 2001-05-16 01:50:40
|
Please bear with me, i'm just learning this... I have set my classpath env var for tclblend.jar and tcljava.jar so why ami i getting this error? My tcl script should be able to call the C function once it is loaded right? Thanks again for any help.. public static void main(String args[]) { try { String myfile = "d:/Tcl83/bin/example.tcl"; Interp newInterp = new Interp(); newInterp.eval("load " + "d:/tcl83/lib/example.dll"); newInterp.evalFile(myfile); newInterp.dispose(); } } ERRORS: tcl.lang.TclException tcl.lang.TclException at tcl.lang.ReturnCmd.cmdProc(ReturnCmd.java) at tcl.lang.Parser.evalObjv(Parser.java) at tcl.lang.Parser.eval2(Parser.java) at tcl.lang.Procedure.cmdProc(Procedure.java) at tcl.lang.Parser.evalObjv(Parser.java) at tcl.lang.Parser.evalObjv(Parser.java) at tcl.lang.Parser.eval2(Parser.java) at tcl.lang.Interp.eval(Interp.java) at tcl.lang.Interp.eval(Interp.java) at Demo1.main(Demo1.java:1003) |
From: Mo D. <md...@cy...> - 2001-05-15 22:28:20
|
On Tue, 15 May 2001, Tam Huynh wrote: > I haven't found anything on tclblend loading dynamic library such as dll's > that are c tcl extensions. I thought about using tcl.lang.Extension but > doesn't loadOnDemand expect a classname? > > String myfile = "d:/Tcl83/bin/hello.tcl"; > Interp newInterp = new Interp(); > Extension.loadOnDemand(newInterp, "example", "d:/tcl83/lib/example.dll"); > newInterp.evalFile(myfile); > newInterp.dispose(); Tcl Blend is a C Tcl extension. You can load it into Tcl along with other C extensions. This is done with the Tcl load command. The Tcl/Java API deals with Java classes not native Tcl extensions, if you want to make Tcl load a .dll then call: interp.eval("load " + dllname); Mo DeJong Red Hat Inc |