[tcljava-user] Using TclPro 1.4 to debug TclBlend Apps.
Brought to you by:
mdejong
From: <PFi...@hb...> - 2004-06-03 11:15:21
|
I have had some success running TclPro 1.4 in a tclBlend1.3.1 environment on WindowsXP. This information may be of use to someone. Stepped through this code. ######################################################### package require java set m [ java::info methods -static String ] foreach i $m { puts $i } # Allocate an instance of a String object. set jstring [java::new String "Hello World"] java::lock $jstring # Convert the Java string to a Tcl string set tstring [$jstring toString] puts \n$tstring\n java::unlock $jstring # Call the method java.lang.Integer.toBinaryString(int) set string [java::call Integer toBinaryString 5] # This will print "result is 101", the binary representation of 5 puts "\nresult is $string\n" puts "END" ######################################################## Doesn't seem to like Swing. TclPro runtime interpreter needs to be set to C:/msys/local/bin/tclsh84.exe. TclPro needs to be started from a bat file which defines the run time variables. Free TclPro distro available from http://sourceforge.net/projects/tclpro/ License key: TclPro (Tcl/Tk) Key 1.4.1 8.3.2 1094-320C-1G38-2U24-P8YY See this thread for settign up TclBlend on Windows XP. http://www.google.com.au/groups?hl=en&lr=lang_en&ie=UTF-8&th=e0361cd7f5dffdc3&rnum=1 Note: I did not install libjvm.ddl and TclBlend seems to work fine. Example TclPro bat file. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ @echo off echo *********************************************************** echo * Setup TclBlend environment for TclPro debugger. echo *********************************************************** setlocal set JAVA_LIB_RUNTIME_PATH=C:\IBM\Java13\bin set JAVA_LIB_RUNTIME_PATH=%JAVA_LIB_RUNTIME_PATH%;C:\IBM\Java13\jre\bin set JAVA_LIB_RUNTIME_PATH=%JAVA_LIB_RUNTIME_PATH%;C:\IBM\Java13\jre\bin\classic set JAVA_LIB_RUNTIME_PATH=%JAVA_LIB_RUNTIME_PATH%;C:\msys\local\lib\tcljava1.3.1 set PATH=%JAVA_LIB_RUNTIME_PATH%;%PATH% set JAVA_CLASSPATH=C:\IBM\Java13\lib\tools.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\Java13\lib\dt.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\Java13\jre\lib\rt.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\Java13\jre\lib\jsse.jar: set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\Java13\jre\lib\jce.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\msys\local\lib\tcljava1.3.1 set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\msys\local\lib\tcljava1.3.1\tclblend.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\msys\local\lib\tcljava1.3.1\tcljava.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\msys\src\tclBlend1.3.1\demos\gluepkg ` set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\WebSphere51\AppServer\lib\admin.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\WebSphere51\AppServer\lib\wasjmx.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\WebSphere51\AppServer\lib\namingclient.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\WebSphere51\AppServer\lib\txClientPrivate.jar set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\IBM\WebSphere51\AppServer\properties set JAVA_CLASSPATH=%JAVA_CLASSPATH%;C:\temp\servermanager.jar set CLASSPATH=%JAVA_CLASSPATH% set TCLLIBPATH=C:\msys\local\lib echo . echo %TCLLIBPATH% echo . echo %path% echo . echo %CLASSPATH% echo . call C:\TclPro1.4\win32-ix86\bin\prodebug.exe endlocal ============================================================ HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 27 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. |