tcljava-user Mailing List for Tcl/Java (Page 15)
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: Bruce J. <nm...@ma...> - 2007-05-25 18:11:23
|
jacl.jar and tcljava.jar are the only necessary files. oro.jar was a regular expression package, a replacement for which is included in the above files. itcl.jar is an optional object oriented language to sit on top of Tcl. tjc.jar is the new Tcl to Java compiler. It includes code that allows you to compile your Tcl procedures to Java and then to Java byte codes. We're using this a lot right now and it is easy to use (after a little learning curve) and definitely can speed your code up a lot. There should be docs for all these in the jacl1.4.0 distribution. Bruce On May 25, 2007, at 2:01 PM, Bill Deegan wrote: > Greetings, > > We're trying to upgrade from an old version of jacl, where we linked > against jacl.jar and oro.jar. > > The new package has: > * tcljava.jar > * jacl.jar > * itcl.jar > * tjc.jar > > Do I need to include all these, or are some optional? > If some are optional what additional functionality does each provide. > > Thanks, > Bill > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Bill D. <bil...@xi...> - 2007-05-25 18:02:01
|
Greetings, We're trying to upgrade from an old version of jacl, where we linked against jacl.jar and oro.jar. The new package has: * tcljava.jar * jacl.jar * itcl.jar * tjc.jar Do I need to include all these, or are some optional? If some are optional what additional functionality does each provide. Thanks, Bill |
From: <Dan...@dl...> - 2007-05-25 09:21:07
|
Hi again, first of all, thank you for your quick reply! I haven't yet been able to figure out why I'm getting this = java.lang.ExceptionInInitializerError, but here's what I get when = running jtclsh with the -verbose:class option. medina@medina:/opt/tclblend/bin> ./jtclsh % set tclblend_init -verbose:class -verbose:class % package require java [...] 1.4.0 % java::new gov.nasa.worldwind.awt.WorldWindowGLCanvas [...] [Loaded javax.media.opengl.GLEventListener from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.AVList from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WWObject from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.AVListImpl from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WWObjectImpl from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WorldWindowImpl from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WorldWindowGLAutoDrawable from = tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.SceneController from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WorldWind from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.RetrievalService from = tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.ThreadedTaskService from = tcl.lang.TclClassLoader] [Loaded java.lang.ExceptionInInitializerError from = /usr/lib/jvm/java-1.5.0-sun-1.5.0_06/jre/lib/rt.jar] [Loaded tcl.lang.ReflectObject from = file:/opt/tclblend/lib/tcljava1.4.0/tcljava.jar] [Loaded tcl.lang.ArrayObject from = file:/opt/tclblend/lib/tcljava1.4.0/tcljava.jar] [Loaded tcl.lang.JavaInfoCmd from = file:/opt/tclblend/lib/tcljava1.4.0/tcljava.jar] [Loaded java.beans.IntrospectionException from = /usr/lib/jvm/java-1.5.0-sun-1.5.0_06/jre/lib/rt.jar] java.lang.ExceptionInInitializerError % There seems to be something wrong with the = gov.nasa.worldwind.ThreadedTaskService class, right? Or is it when = trying to load the next class that the error occurs? In this case, how = can I find out which class it's trying to load after it has successfully = loaded the ThreadedTaskService class? Also, running jtclsh with the -verbose:jni option yields this result: medina@medina:/opt/tclblend/bin> ./jtclsh % set tclblend_init -verbose:jni -verbose:jni % package require java [...] 1.4.0 % java::new gov.nasa.worldwind.awt.WorldWindowGLCanvas [...] [Dynamic-linking native method = sun.reflect.NativeMethodAccessorImpl.invoke0 ... JNI] [Dynamic-linking native method = com.sun.opengl.impl.x11.GLX.glXChooseVisual1 ... JNI] [Dynamic-linking native method = com.sun.opengl.impl.x11.GLX.XGetVisualInfo1 ... JNI] [Dynamic-linking native method com.sun.opengl.impl.x11.GLX.glXGetConfig1 = ... JNI] [Dynamic-linking native method sun.awt.X11GraphicsDevice.getNumConfigs = ... JNI] //here it stays for a while, before continuing [Dynamic-linking native method tcl.lang.CObject.newCObject ... JNI] [Dynamic-linking native method tcl.lang.CObject.incrRefCount ... JNI] [Dynamic-linking native method tcl.lang.TclList.append ... JNI] [Dynamic-linking native method tcl.lang.Interp.setErrorCode ... JNI] [Dynamic-linking native method tcl.lang.CObject.decrRefCount ... JNI] [Dynamic-linking native method tcl.lang.Interp.setResult ... JNI] java.lang.ExceptionInInitializerError % I also tried to create an instance of another class, = gov.nasa.worldwind.awt.WorldWindowGLJPanel, and got a similar result: With -verbose:class option: medina@medina:/opt/tclblend/bin> ./jtclsh % set tclblend_init -verbose:class -verbose:class % package require java [...] 1.4.0 % java::new gov.nasa.worldwind.awt.WorldWindowGLJPanel [...] [Loaded gov.nasa.worldwind.AVListImpl from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WWObjectImpl from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WorldWindowImpl from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WorldWindowGLAutoDrawable from = tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.SceneController from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.WorldWind from tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.RetrievalService from = tcl.lang.TclClassLoader] [Loaded gov.nasa.worldwind.ThreadedTaskService from = tcl.lang.TclClassLoader] [Loaded java.lang.ExceptionInInitializerError from = /usr/lib/jvm/java-1.5.0-sun-1.5.0_06/jre/lib/rt.jar] [Loaded tcl.lang.ReflectObject from = file:/opt/tclblend/lib/tcljava1.4.0/tcljava.jar] [Loaded tcl.lang.ArrayObject from = file:/opt/tclblend/lib/tcljava1.4.0/tcljava.jar] [Loaded tcl.lang.JavaInfoCmd from = file:/opt/tclblend/lib/tcljava1.4.0/tcljava.jar] [Loaded java.beans.IntrospectionException from = /usr/lib/jvm/java-1.5.0-sun-1.5.0_06/jre/lib/rt.jar] java.lang.ExceptionInInitializerError % With -verbose:jni option: medina@medina:/opt/tclblend/bin> ./jtclsh % set tclblend_init -verbose:jni -verbose:jni % package require java [...] 1.4.0 % java::new gov.nasa.worldwind.awt.WorldWindowGLJPanel [...] [Dynamic-linking native method java.lang.StrictMath.floor ... JNI] [Dynamic-linking native method java.awt.KeyboardFocusManager.initIDs ... = JNI] [Dynamic-linking native method sun.awt.X11.XlibWrapper.XEventsQueued ... = JNI] [Dynamic-linking native method sun.awt.X11.XToolkit.waitForEvents ... = JNI] [Dynamic-linking native method java.lang.Class.isInstance ... JNI] [Dynamic-linking native method = sun.reflect.NativeMethodAccessorImpl.invoke0 ... JNI] [Dynamic-linking native method java.awt.Rectangle.initIDs ... JNI] = //here it stays for a while, before continuing [Dynamic-linking native method tcl.lang.CObject.newCObject ... JNI] [Dynamic-linking native method tcl.lang.CObject.incrRefCount ... JNI] [Dynamic-linking native method tcl.lang.TclList.append ... JNI] [Dynamic-linking native method tcl.lang.Interp.setErrorCode ... JNI] [Dynamic-linking native method tcl.lang.CObject.decrRefCount ... JNI] [Dynamic-linking native method tcl.lang.Interp.setResult ... JNI] java.lang.ExceptionInInitializerError %=20 Just in case, the contents of the ThreadedTaskService.java file are as = follows: --------------------------------------- --------------------------------------- --------------------------------------- /* Copyright (C) 2001, 2006 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved. */ package gov.nasa.worldwind; /** * @author Tom Gaskins * @version $Id: ThreadedTaskService.java 1792 2007-05-08 21:28:37Z = tgaskins $ */ public class ThreadedTaskService extends WWObjectImpl // TODO: Extract = interface implements Thread.UncaughtExceptionHandler { static final private int DEFAULT_CORE_POOL_SIZE =3D 1; static final private int DEFAULT_QUEUE_SIZE =3D 10; private static final String RUNNING_THREAD_NAME_PREFIX =3D = WorldWind.retrieveMessage( "ThreadedTaskService.RUNNING_THREAD_NAME_PREFIX", = "ThreadStrings"); private static final String IDLE_THREAD_NAME_PREFIX =3D = WorldWind.retrieveMessage( "ThreadedTaskService.IDLE_THREAD_NAME_PREFIX", "ThreadStrings"); private java.util.concurrent.ConcurrentLinkedQueue<Runnable> = activeTasks; // tasks currently allocated a thread private TaskExecutor executor; // thread pool for running retrievers public ThreadedTaskService() { Integer poolSize =3D = Configuration.getIntegerValue(AVKey.THREADED_TASK_POOL_SIZE, = DEFAULT_CORE_POOL_SIZE); Integer queueSize =3D = Configuration.getIntegerValue(AVKey.THREADED_TASK_QUEUE_SIZE, = DEFAULT_QUEUE_SIZE); // this.executor runs the tasks, each in their own thread this.executor =3D new TaskExecutor(poolSize, queueSize); // this.activeTasks holds the list of currently executing tasks this.activeTasks =3D new = java.util.concurrent.ConcurrentLinkedQueue<Runnable>(); } public void uncaughtException(Thread thread, Throwable throwable) { if (throwable instanceof WWDuplicateRequestException) return; String message =3D = WorldWind.retrieveErrMsg("ThreadedTaskService.UncaughtExceptionDuringTask= ") + thread.getName(); WorldWind.logger().log(java.util.logging.Level.FINE, message); = Thread.currentThread().getThreadGroup().uncaughtException(thread, = throwable); } private class TaskExecutor extends = java.util.concurrent.ThreadPoolExecutor { private static final long THREAD_TIMEOUT =3D 2; // keep idle = threads alive this many seconds private TaskExecutor(int poolSize, int queueSize) { super(poolSize, poolSize, THREAD_TIMEOUT, = java.util.concurrent.TimeUnit.SECONDS, new = java.util.concurrent.ArrayBlockingQueue<Runnable>(queueSize), new java.util.concurrent.ThreadFactory() { public Thread newThread(Runnable runnable) { Thread thread =3D new Thread(runnable); thread.setDaemon(true); thread.setPriority(Thread.MIN_PRIORITY); = thread.setUncaughtExceptionHandler(ThreadedTaskService.this); return thread; } }, new = java.util.concurrent.ThreadPoolExecutor.DiscardPolicy() // abandon task = when queue is full { public void rejectedExecution(Runnable runnable, java.util.concurrent.ThreadPoolExecutor = threadPoolExecutor) { // Interposes logging for rejected execution String message =3D = WorldWind.retrieveErrMsg("ThreadedTaskService.ResourceRejected") + = runnable; = WorldWind.logger().log(java.util.logging.Level.FINEST, message); super.rejectedExecution(runnable, = threadPoolExecutor); } }); } protected void beforeExecute(Thread thread, Runnable runnable) { WorldWind.logger().log(java.util.logging.Level.FINEST, = WorldWind.retrieveErrMsg( "ThreadedTaskService.EnteringBeforeExecute")); if (thread =3D=3D null) { String msg =3D = WorldWind.retrieveErrMsg("nullValue.ThreadIsNull"); WorldWind.logger().log(java.util.logging.Level.FINE, = msg); throw new IllegalArgumentException(msg); } if (runnable =3D=3D null) { String msg =3D = WorldWind.retrieveErrMsg("nullValue.RunnableIsNull"); WorldWind.logger().log(java.util.logging.Level.FINE, = msg); throw new IllegalArgumentException(msg); } if (ThreadedTaskService.this.activeTasks.contains(runnable)) { String message =3D = WorldWind.retrieveErrMsg("ThreadedTaskService.CancellingDuplicateTask") = + runnable; WorldWind.logger().log(java.util.logging.Level.FINER, = message); throw new WWDuplicateRequestException(message); } ThreadedTaskService.this.activeTasks.add(runnable); if (RUNNING_THREAD_NAME_PREFIX !=3D null) thread.setName(RUNNING_THREAD_NAME_PREFIX + runnable); thread.setPriority(Thread.MIN_PRIORITY); = thread.setUncaughtExceptionHandler(ThreadedTaskService.this); super.beforeExecute(thread, runnable); WorldWind.logger().log(java.util.logging.Level.FINEST, = WorldWind.retrieveErrMsg( "ThreadedTaskService.LeavingBeforeExecute")); } protected void afterExecute(Runnable runnable, Throwable = throwable) { WorldWind.logger().log(java.util.logging.Level.FINEST, = WorldWind.retrieveErrMsg( "ThreadedTaskService.EnteringAfterExecute")); if (runnable =3D=3D null) { String msg =3D = WorldWind.retrieveErrMsg("nullValue.RunnableIsNull"); WorldWind.logger().log(java.util.logging.Level.FINE, = msg); throw new IllegalArgumentException(msg); } super.afterExecute(runnable, throwable); ThreadedTaskService.this.activeTasks.remove(runnable); if (throwable =3D=3D null && IDLE_THREAD_NAME_PREFIX !=3D = null) Thread.currentThread().setName(IDLE_THREAD_NAME_PREFIX); } } public synchronized boolean contains(Runnable runnable) { //noinspection SimplifiableIfStatement if (runnable =3D=3D null) return false; return (this.activeTasks.contains(runnable) || = this.executor.getQueue().contains(runnable)); } /** * Enqueues a task to run. * @param runnable the task to add * @throws IllegalArgumentException if <code>runnable</code> is null */ public synchronized void addTask(Runnable runnable) { if (runnable =3D=3D null) { String message =3D = WorldWind.retrieveErrMsg("nullValue.RunnableIsNull"); WorldWind.logger().log(java.util.logging.Level.FINE, = message); throw new IllegalArgumentException(message); } // Do not queue duplicates. if (this.activeTasks.contains(runnable) || = this.executor.getQueue().contains(runnable)) return; this.executor.execute(runnable); } public boolean isFull() { return this.executor.getQueue().remainingCapacity() =3D=3D 0; } } --------------------------------------- --------------------------------------- --------------------------------------- I really would be very grateful if you could help me with this. Kind regards, Daniel Medina -----Original Message----- From: tcl...@li... on behalf of Mo DeJong Sent: Wed 5/23/2007 9:46 PM To: A list for users of tcljava Subject: Re: [tcljava-user] Using Tcl Blend with NASA WorldWind Java SDK =20 Dan...@dl... wrote: > Hi, > =20 > Specifically, I get the following error message when trying to create = a WorldWindowGLCanvas object from jtclsh: > =20 > medina@onyx:/opt/tclblend/bin> ./jtclsh > % package require java > 1.4.0 > % java::call System getProperty "java.version" > 1.5.0_06 > =20 Tcl Blend should work find with JDK 1.5. > % java::new javax.swing.JFrame > java0x1 > % java::new javax.media.opengl.GLCanvas > java0x2 > % java::new gov.nasa.worldwind.layers.IconLayer > java0x3 > % java::new gov.nasa.worldwind.layers.Earth.EarthNASAPlaceNameLayer > java0x4 > % java::new gov.nasa.worldwind.awt.AWTInputHandler > java0x5 > % java::new gov.nasa.worldwind.awt.WorldWindowGLCanvas > java.lang.ExceptionInInitializerError > =20 This is a generic Java error that indicates an exception was raised=20 while loading the class or invoking the static init method for the class. You will have to look at the class in=20 question to find out why. If this package uses native code then it could fail because it does not find needed DLL=20 on the PATH. I hope that helps Mo -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Patrick F. <fin...@gm...> - 2007-05-24 08:08:51
|
On 24/05/07, Mrinal Khanvilkar <mr...@gm...> wrote: > > Hi, > I have a web application which runs expect scripts on remote machines > using tclBlend. Now i want to use the same thing to push java objects into > the data base > > this is how i invoke the jtclsh shell from my web application > > Runtime rt = Runtime.getRuntime(); > Process proc = rt.exec("cmd /c > C:\\TclBlend\\bin\\jtclsh.exe C:\\ScriptFiles\\script"+ ""+ID > + ConstantsFile.SCRIPT_FILE_EXTENSION); > > and the contents of the script file that i am using is given below > > #!C:\TclBlend\bin\jtclsh -- > package require java > package require Expect > set session null > spawn telnet afads 23 > set something [java::new chars.rulewizard.GenerateFactObject "mrinal123"] > puts $something Try setting the Tcl Classpath variable inside the tcl script. E.G for MQ. # build tcl classpath append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mq.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/base\; append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mqjms.jar\; append x $drive/IBM/WebSphereMQ/Tools/Java/jms\; append x $drive/IBM/WebSphereMQ/Java/lib/com.ibm.mqbind.jar\; set env(TCL_CLASSPATH) $x puts "\nTCL_CLASSPATH = [ array get env TCL_CLASSPATH ]\n" See class loading page of manual. http://tcljava.sourceforge.net/docs/TclJava/ClassLoading.html Also check the system classpath supplied to the script. Something like: set classPath [ split [ lindex [ array get env CLASSPATH ] 1 ] { ; } ] foreach i $classPath { if { $i != {} } { puts $i } } |
From: Mrinal K. <mr...@gm...> - 2007-05-24 05:33:10
|
Hi, I have a web application which runs expect scripts on remote machines using tclBlend. Now i want to use the same thing to push java objects into the data base this is how i invoke the jtclsh shell from my web application Runtime rt = Runtime.getRuntime(); Process proc = rt.exec("cmd /c C:\\TclBlend\\bin\\jtclsh.exe C:\\ScriptFiles\\script"+ ""+ID + ConstantsFile.SCRIPT_FILE_EXTENSION); and the contents of the script file that i am using is given below #!C:\TclBlend\bin\jtclsh -- package require java package require Expect set session null spawn telnet afads 23 set something [java::new chars.rulewizard.GenerateFactObject "mrinal123"] puts $something and the "GenerateFactObject" class is just a dummy class i want to instantiate for testing /** * * @author Baba */ public class GenerateFactObject { public static FactObject fact; /** Creates a new instance of GenerateFactObject */ public GenerateFactObject(String strName) { System.out.println("working = " + strName); } } now when i try to run that script it gives me "unknown class "GenerateFactObject"" i know there can be a problem with the classpath but i changed it but the error doesnt go. the next thing i tried is that i copied the GenerateFactObject.class file into the C:\TclBlend\bin dir(where jtclsh is present) Again when i tried running (java::new GeneratFactObject "Mrinal") ,it still gives me the same error (unknown class "GenerateFactObject"). In short, if I want to instantiate custom java objects , what should be location for there class files? can anyone please guide me on this. Regards, Mrinal |
From: Mo D. <mo...@mo...> - 2007-05-23 19:46:16
|
Dan...@dl... wrote: > Hi, > > Specifically, I get the following error message when trying to create a WorldWindowGLCanvas object from jtclsh: > > medina@onyx:/opt/tclblend/bin> ./jtclsh > % package require java > 1.4.0 > % java::call System getProperty "java.version" > 1.5.0_06 > Tcl Blend should work find with JDK 1.5. > % java::new javax.swing.JFrame > java0x1 > % java::new javax.media.opengl.GLCanvas > java0x2 > % java::new gov.nasa.worldwind.layers.IconLayer > java0x3 > % java::new gov.nasa.worldwind.layers.Earth.EarthNASAPlaceNameLayer > java0x4 > % java::new gov.nasa.worldwind.awt.AWTInputHandler > java0x5 > % java::new gov.nasa.worldwind.awt.WorldWindowGLCanvas > java.lang.ExceptionInInitializerError > This is a generic Java error that indicates an exception was raised while loading the class or invoking the static init method for the class. You will have to look at the class in question to find out why. If this package uses native code then it could fail because it does not find needed DLL on the PATH. I hope that helps Mo |
From: Patrick F. <pfi...@oz...> - 2007-05-23 18:32:07
|
On Wednesday 23 May 2007 18:33, Dan...@dl... wrote: > % java::call System getProperty "java.version" > 1.5.0_06 AFAIK Tclblend supports <= java 1.4.x. |
From: <Dan...@dl...> - 2007-05-23 17:34:15
|
Hi, =20 I'm trying to use Tcl Blend together with the NASA WorldWind Java (WWJ) = SDK, i.e. creating WWJ objects from Tcl, accessing their fields, = invoking their methods, etc. [WWJ uses JOGL for the visualization of a = virtual globe (analogous to Google Earth)] =20 I have been able to create JOGL objects from Tcl, such as GLCanvas, = GLJPanel, and some WWJ objects such as IconLayer, = EarthNASAPlaceNameLayer, etc. but I have not been able to create some = WWJ objects, in particular WorldWindowGLCanvas and WorldWindowGLJPanel. =20 Specifically, I get the following error message when trying to create a = WorldWindowGLCanvas object from jtclsh: =20 medina@onyx:/opt/tclblend/bin> ./jtclsh % package require java 1.4.0 % java::call System getProperty "java.version" 1.5.0_06 % java::new javax.swing.JFrame java0x1 % java::new javax.media.opengl.GLCanvas java0x2 % java::new gov.nasa.worldwind.layers.IconLayer java0x3 % java::new gov.nasa.worldwind.layers.Earth.EarthNASAPlaceNameLayer java0x4 % java::new gov.nasa.worldwind.awt.AWTInputHandler java0x5 % java::new gov.nasa.worldwind.awt.WorldWindowGLCanvas java.lang.ExceptionInInitializerError % =20 I would appreciate it if anyone could provide some help on this. =20 Thanks in advance! Daniel |
From: wang d. <ru...@ya...> - 2007-05-17 08:22:22
|
If I really need to load .dll files, is there any solutions? Any help or suggestions? ----- Original Message ---- From: wang dada <ru...@ya...> To: A list for users of tcljava <tcl...@li...> Sent: Thursday, May 17, 2007 2:18:00 PM Subject: Re: [tcljava-user] invalid command name "load" when eval tcl in java Thanks. I have a tcl script. And in the code there is "load xxx.dll". The requirement now is to retrive data from the tcl script in a java program. So I cannot use Tclblend, cause it is used to write java code in Tcl, right? I cannot modify the tcl script. In this situation, what should I do? Is there any solution? Best regards, Joy ----- Original Message ---- From: Mo DeJong <mo...@mo...> To: A list for users of tcljava <tcl...@li...> Sent: Thursday, May 17, 2007 1:46:47 PM Subject: Re: [tcljava-user] invalid command name "load" when eval tcl in java wang dada wrote: > Hi, > Now I am writing a java plugin in eclipse to try to get data from > a Tcl API. > My code is as following: > *Interp interp; > interp = new Interp(); > try{ > interp.eval("package require XXXX"); > interp.eval("::XXXX::YYYY"); > * > * // TclObject[] result = TclList.getElements(interp, > interp.getResult()); > > } > catch(TclException ex){* > * .................................. > } > finally{ > interp.dispose(); > }* > The error is "invalid command name "load"", > there is "load [file join $dir zz.dll zz" in the tcl script of XXXX, > the path of dll file is right. Why the dll cannot be loaded? Jacl does not support the load command since it only works C dlls. You could use Tcl Blend though. Mo ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user ____________________________________________________________________________________Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting |
From: wang d. <ru...@ya...> - 2007-05-17 06:18:08
|
Thanks. I have a tcl script. And in the code there is "load xxx.dll". The requirement now is to retrive data from the tcl script in a java program. So I cannot use Tclblend, cause it is used to write java code in Tcl, right? I cannot modify the tcl script. In this situation, what should I do? Is there any solution? Best regards, Joy ----- Original Message ---- From: Mo DeJong <mo...@mo...> To: A list for users of tcljava <tcl...@li...> Sent: Thursday, May 17, 2007 1:46:47 PM Subject: Re: [tcljava-user] invalid command name "load" when eval tcl in java wang dada wrote: > Hi, > Now I am writing a java plugin in eclipse to try to get data from > a Tcl API. > My code is as following: > *Interp interp; > interp = new Interp(); > try{ > interp.eval("package require XXXX"); > interp.eval("::XXXX::YYYY"); > * > * // TclObject[] result = TclList.getElements(interp, > interp.getResult()); > > } > catch(TclException ex){* > * .................................. > } > finally{ > interp.dispose(); > }* > The error is "invalid command name "load"", > there is "load [file join $dir zz.dll zz" in the tcl script of XXXX, > the path of dll file is right. Why the dll cannot be loaded? Jacl does not support the load command since it only works C dlls. You could use Tcl Blend though. Mo ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ tcljava-user mailing list tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcljava-user ____________________________________________________________________________________Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow |
From: Mo D. <mo...@mo...> - 2007-05-17 05:47:39
|
wang dada wrote: > Hi, > Now I am writing a java plugin in eclipse to try to get data from > a Tcl API. > My code is as following: > *Interp interp; > interp = new Interp(); > try{ > interp.eval("package require XXXX"); > interp.eval("::XXXX::YYYY"); > * > * // TclObject[] result = TclList.getElements(interp, > interp.getResult()); > > } > catch(TclException ex){* > * .................................. > } > finally{ > interp.dispose(); > }* > The error is "invalid command name "load"", > there is "load [file join $dir zz.dll zz" in the tcl script of XXXX, > the path of dll file is right. Why the dll cannot be loaded? Jacl does not support the load command since it only works C dlls. You could use Tcl Blend though. Mo |
From: wang d. <ru...@ya...> - 2007-05-17 02:21:24
|
Hi, Now I am writing a java plugin in eclipse to try to get data from a Tcl API. My code is as following: Interp interp; interp = new Interp(); try{ interp.eval("package require XXXX"); interp.eval("::XXXX::YYYY"); // TclObject[] result = TclList.getElements(interp, interp.getResult()); } catch(TclException ex){ .................................. } finally{ interp.dispose(); } The error is "invalid command name "load"", there is "load [file join $dir zz.dll zz" in the tcl script of XXXX, the path of dll file is right. Why the dll cannot be loaded? And I also notice that [info sharedlibextension] is jar, not dll. The auto_path is "resource:lang/tcl/library", info library=E:\eclipse-SDK-3.3M6-win32\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070319.jar. I think maybe the enviornment is not set properply. But how can I change the environment? Could you please give me some idea? I really do not know. Any help will be greatly appreciated. Another question is when interp.eval(::xxxx::yyyy), there is error "cannot find package" or "invalid command name ::xxxx::yyyy. Does Jacl of Tclblend support package? Just want to confirm. I think this problem maybe is the same as the first one. BTW all the script run successfully in Tcl console. Thanks again Best regards, Joy ____________________________________________________________________________________Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow |
From: Jim M. <thi...@ya...> - 2007-05-15 00:19:24
|
Hi Patrick - thanks for the sample code for using apache derby(cloudscape) at the activestate site. it is very cool :-) i wasn't 100% sure i could use derby last night. i hadnt had a chance to read the links yet. i just checked and i can use possibly use hibernate with derby to. derby and hibernate usage will be the first things i test. if i can use hibernate, i already have an idea for my first project. now i sit around waiting for my books for a week or so. thanks again, jim --------------------------------- Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. |
From: Jim M. <thi...@ya...> - 2007-05-14 21:34:01
|
>>This is not correct, a JVM is needed on the deployment machine. ok. i will use the precompiled version patrick talks about below. i just ordered a TCL/TK book and a java 1.4 book. i tested the tcl - c++ tool before i think it is called swig. i think i will like this much better. thanks very much for the help, jim "the solution is to com= pile TclBlend once and ship it with it;s own Jre to the target systems. We = now have a precompiled version of TclBlend for windows which you can get at= www.patrickfinnegan.com." --------------------------------- Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. |
From: Mo D. <mo...@mo...> - 2007-05-14 20:21:21
|
Jim McNamara wrote: > hi- > i thought about this after i took a break. if it says it has an embedded > jvm. so that means to me that if on the development machine i create > the byte code then the embedded jvm can turn the byte code into > machine code and then execute it. > > so it seems there is no jre needed on the deployment machine. This is not correct, a JVM is needed on the deployment machine. In general, Java is an interpreted runtime. The hotspot compiler will speed up execution time but a JVM is still needed at runtime to execute Java code. The Tcl Blend module makes it easy to create both a Tcl interpreter and a Java interpreter in the same process and then let each interpreter talk to the other. cheers Mo DeJong |
From: Jim M. <thi...@ya...> - 2007-05-14 09:09:54
|
had some experience on that one. i had a eclipse app i made with derby client. then i switched it to embedded. fooled around making minor modifications coding and left a connection open. had to reboot the machine. not the best way to debug! all that was missing was the win 95 blue screen gpf message. once it is ready it sure is nice to lose the 35mb though for deployment. thanks, jim --------------------------------- Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. |
From: Jim M. <thi...@ya...> - 2007-05-14 08:24:34
|
hi Patrick- i saw where they have a oratcl instant client version. so there is a small footprint jdbc db even if apache derby wont work. not sure yet. thanks so much for the help. i better get some sleep. jim --------------------------------- Give spam the boot. Take control with tough spam protection in the all-new Yahoo! Mail Beta. |
From: Jim M. <thi...@ya...> - 2007-05-14 07:42:39
|
hi Patrick - i just went to the first link and saw you were using oracle with a JDBC driver. I use windows O/S. i remember there was oratcl. i am hoping there is oratcl is embedded like apache derby can be or i might be able to use apache derby. but my first thoughts on that is it might be easier to use a jdbc db that tcl already has bindings for. not sure yet. what i am going to investigate right now is the requirements for using groovy and how that relates to this. i just checked that. 1.4 or greater is ok. i am used to 1.5 but i could probably pick up a used 1.4 manual. this sounds really cool so far. thanks for the great links and assistance, jim --------------------------------- Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. |
From: Jim M. <thi...@ya...> - 2007-05-14 06:05:17
|
hi- i thought about this after i took a break. if it says it has an embedded jvm. so that means to me that if on the development machine i create the byte code then the embedded jvm can turn the byte code into machine code and then execute it. so it seems there is no jre needed on the deployment machine. this seems cool as you could use groovy too. i wonder if i could use a db that works with groovy? i'll have to check into that. please let me know if i got it right. thank you, jim --------------------------------- Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. |
From: Jim M. <thi...@ya...> - 2007-05-14 04:35:30
|
hi - wikipedia says - TCLBLEND: call Java class libraries from the C runtime using JNI and an embedded JVM. i think i read that java has to be compiled to bytecode before it can be interpreted. once the java code is compiled does tclblend require the java runtime environment present so a java method or object can be used from within tcl? in other words if i wanted to deploy a tcl app that used tclblend would i also need to deploy the jre? i was hoping i could write code that made use of collections and call it from tcl without having the jre needed for deployment. that would be a big feature. some people dont want to download the entire jre before checking out my java app (and in this case tcl app). thanks for shedding some light on this for me. i usually dont know what makes something run behind the scenes. jim --------------------------------- Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. |
From: Mo D. <mo...@mo...> - 2007-05-09 18:06:36
|
shrisha karanth wrote: > Hello All, > > Recently i am involved in new project which required to implement the > certain function using java and tcl.During this i faced some problem > in the code. > > > ======================== > > * > > import > > * tcl.lang.*; * > > public > > * *class* Ixia *implements* Testset{ *public* *void* initIxia() > > { > > Interp interp= > > *new* Interp(); String scriptFileName="c:\\TCAS\\cgi-bin\\lib\\ethr.tcl"; You need to either tell the package system how to load a package named "Ixia" or just declare the package as loaded after sourcing ethr.tcl. You could do something like: package ifneeded Ixia 1.0 {source c:/TCAS/cgi-bin/lib/ethr.tcl/ethr.tcl ; package provide Ixia 1.0} Take a look at the package command manual and you should be able to figure it out. http://www.tcl.tk/man/tcl8.4/TclCmd/package.htm cheers Mo DeJong |
From: shrisha k. <nav...@gm...> - 2007-05-09 09:14:08
|
Hello all, Recently i am involved in new project which required to implement the certain function using java and tcl.During this i faced some problem in the code. My problem was not able to load the package IxTclHal from tcl through java. i do hava a tcl script like this ========================= package require IxTclHal (This is the package required to load) #----------------------------------------------------------- # e.g. set portList [list [list 1 4 1] [list 1 4 2]] #----------------------------------------------------------- proc initIxia { portList } { set host 192.168.3.126 set username "TCAS User" if [isUNIX] { if [ixConnectToTclServer $host] { ixPuts "Could not connect to $host" return 1 } } # Now connect to the chassis if [ixConnectToChassis $host] { ixPuts $::ixErrorInfo return 1 } # Get the chassis ID to use in port lists set chas [ixGetChassisID $host] set num [llength $portList] for {set i 0} {$i<$num} {incr i 1} { set Port($i) [lindex $portList $ ============================= And my java code is like this ======================== * import * tcl.lang.*; * public * *class* Ixia *implements* Testset{ *public* *void* initIxia() { Interp interp= *new* Interp(); String scriptFileName="c:\\TCAS\\cgi-bin\\lib\\ethr.tcl"; ** *try* { interp.setVar( "host",TclString.*newInstance*("192.168.3.100 "),0); interp.eval*File(* *"ScriptFileName*"); } *catch*(Exception e){System.*out*.println(e); } } ========================= when i run this code it gives me the exception like this ================ * tcl.lang.TclException *: can't find package IxTclHal ================= Basically i want to know how to load tcl script and i turn will have package file.Where should i put these package file. But i run "Package require IxTclHal" from tcl prompt it is loading the package.But throug the java program it is not working. Please help me it is needed very urgent Thanks Shrisha |
From: shrisha k. <nav...@gm...> - 2007-05-09 07:24:20
|
Hello All, Recently i am involved in new project which required to implement the certain function using java and tcl.During this i faced some problem in the code. My problem was not able to load the package from java. i do hava a tcl script like this ========================= package require IxTclHal package require params source "$params::libdir/alarms.tcl" #----------------------------------------------------------- # e.g. set portList [list [list 1 4 1] [list 1 4 2]] #----------------------------------------------------------- proc initIxia { portList } { set host 192.168.3.126 set username "TCAS User" if [isUNIX] { if [ixConnectToTclServer $host] { ixPuts "Could not connect to $host" return 1 } } # Now connect to the chassis if [ixConnectToChassis $host] { ixPuts $::ixErrorInfo return 1 } # Get the chassis ID to use in port lists set chas [ixGetChassisID $host] set num [llength $portList] for {set i 0} {$i<$num} {incr i 1} { set Port($i) [lindex $portList $ ============================= And my java code is like this ======================== * import * tcl.lang.*; * public * *class* Ixia *implements* Testset{ *public* *void* initIxia() { Interp interp= *new* Interp(); String scriptFileName="c:\\TCAS\\cgi-bin\\lib\\ethr.tcl"; ** *try* { interp.setVar( "host",TclString.*newInstance*("192.168.3.100 "),0); interp.eval*File(* *"ScriptFileName*"); } *catch*(Exception e){System.*out*.println(e); } } ========================= when i run this code it gives me the exception like this ================ * tcl.lang.TclException *: can't find package IxTclHal ================= Basically i want to know how to load tcl script and i turn will have package file.Where should i put these package file. But i run "Package require IxTclHal" from tcl prompt it is loading the package.But throug the java program it is not working. Please help me it is needed very urgent Thanks Shrisha |
From: shrisha k. <nav...@gm...> - 2007-05-08 13:09:38
|
Recently i am involved in new project which required to implement the certain function using java and tcl.During this i faced some problem in the code. My problem was not able to load the package from java. i do hava a tcl script like this ========================= package require IxTclHal package require params source "$params::libdir/alarms.tcl" #----------------------------------------------------------- # e.g. set portList [list [list 1 4 1] [list 1 4 2]] #----------------------------------------------------------- proc initIxia { portList } { set host 192.168.3.126 set username "TCAS User" if [isUNIX] { if [ixConnectToTclServer $host] { ixPuts "Could not connect to $host" return 1 } } # Now connect to the chassis if [ixConnectToChassis $host] { ixPuts $::ixErrorInfo return 1 } # Get the chassis ID to use in port lists set chas [ixGetChassisID $host] set num [llength $portList] for {set i 0} {$i<$num} {incr i 1} { set Port($i) [lindex $portList $ ============================= And my java code is like this ======================== * import *tcl.lang.*; * public **class* Ixia *implements* Testset{ *public* *void* initIxia() { Interp interp= *new* Interp(); String scriptFileName="c:\\TCAS\\cgi-bin\\lib\\ethr.tcl"; ** *try* { interp.setVar( "host",TclString.*newInstance*(" 192.168.3.100 "),0); interp.eval*File(* *"ScriptFileName*"); } *catch*(Exception e){System.*out*.println(e); } } ========================= when i run this code it gives me the exception like this ================ * tcl.lang.TclException *: can't find package IxTclHal ================= Basically i want to know how to load tcl script and in turn will have to load package.Where should i put these package file. But i run "Package require IxTclHal" from tcl prompt it is loading the package.But throug the java program it is not working. Please help me it is needed very urgent Thanks Naveen |
From: shrisha k. <nav...@gm...> - 2007-05-05 17:25:42
|
Thanks for the reply and it was a good example. On 5/5/07, Mo DeJong <mo...@mo...> wrote: > > shrisha karanth wrote: > > Hello all, > > > > I require some example of TclList, > > > > My Problem is that i want to send arrayList to the TCL from java.so i > > wanto to know how to intiliaze tcllist and append values into it. > > > > Thanks > > Naveen > > > Hello Naveen > > Here is the most simple example of TclList usage: > > { > TclObject alist = TclList.newInstance(); > TclList.append(interp, alist, TclString.newInstance("ONE")); > TclList.append(interp, alist, TclString.newInstance("TWO")); > TclList.append(interp, alist, TclString.newInstance("THREE")); > interp.setResult(alist); > } > > > To get values out of a ArrayList, just iterate over the elements and > create a TclString or TclInteger > object for each element before adding to the TclList. > > I hope that helps > Mo DeJong > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user > |