Artifact Content
Not logged in

Artifact 4b01682262e5d36e776a25b0edeec98fbcc7cdd5:

JBlend Package

JBlend Package



Loading into Tcl interpreter:


<b>package require JBlend ?version?</b>

<B>package require JBlend</B> loads the <B>JBLend</B> package into the
interpreter. The <B>JBlend</B> package provides an interface for creating and
manipulating Java objects via <I>object handles</I>. Object handles are
references to Java objects in Tcl. Many of the commands in this
package take arguments and return values that are object handles.


When the <B>JBlend</B> package is loaded into a Tcl interpreter, a new 
namespace named <B>::java</B> will be created, along with a new JVM instance in Tcl's process space.


You can control some how to start this JVM instance, by setting the global variable
<B>tclblend_init</B> <U>before</U> loading the package.
Note that <B>tclblend_init</B> is a <U>list of strings</U>, and each element is passed as
an option to the Java Virtual Machine being instantiated (see Example below).
After loading the package, you can inspect all the JVM properties by examining
the global array <B>::java::jvm</B> ( or the old <U>deprecated</U> array <B>::tcljava</B>).


<code>lappend ::tclblend_init "-verbose:jni"  ;#print debugging messages</code>

For <B>-verbose</B>, the value should be a string with one or
more comma separated names (i.e. <B>class,jni</B>).  
The standard names are:
	 <B>class</B>, <B>gc</B>, <B>jni</B>
To see what other options are available, run <B>java -help</B>
from the command line.
In addition <B>tclblend_init</B> can have the following values:
Print a help message and then stop JVM initialization.<br>
Print out debugging messages when the package is loaded.<br>
To use <B>tclblend_init</B>, set it before loading the <B>java</B>

set tclblend:init {}
lappend tclblend_init "-verbose:jni"
lappend tclblend_init "debug"
package require JBlend

parray java::jvm  ;# prints all the currently loaded JVM properties.



<pre>Based on TclBlend <a href="../license.html">Copyright</a> &copy; 1994-1998 Sun Microsystems, Inc.<br></pre>
<pre>JBlend is Copyright &copy; 2016 - Irrational Numbers.<br></pre>