Check-in [e575a41f73]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:update tclJBlend to version 2.1
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e575a41f73eee2fb14836b17583684920d4fdeee
User & Date: chw 2019-09-18 03:47:58
Context
2019-09-19
04:51
improve async mode and dir lookups in zipfs check-in: 8b4b8de192 user: chw tags: trunk
2019-09-18
03:47
update tclJBlend to version 2.1 check-in: e575a41f73 user: chw tags: trunk
03:47
add selected tcl upstream changes check-in: ad5759b8f4 user: chw tags: trunk
Changes

Deleted assets/tclJBlend2.0/javaUtils.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# javaUtils.tcl --
#
# Collections of utilities


# java::jvmProperties --
#
#	Make a java::call to java.lang.System getProperties method
#	and store info about the JVM
#
# Results:
#	A tcl dictionary of about 50 key-values ..

proc java::jvmProperties {} {
    set KV [dict create]
    set props [java::call System getProperties]
    set names [$props propertyNames]
    while { [$names hasMoreElements] } {
	set key [[$names nextElement] toString]
	set value [$props getProperty $key]
	dict set KV $key $value
    }
    return $KV
}

# alternative, fastest .. ??
proc java::alt_jvmProperties {} {
    set KV [dict create]
    set props [java::call System getProperties]
    foreach entry [java::listify {java.util.Map.Entry} [$props entrySet]] {
	set key [[$entry getKey] toString]
	set value [[$entry getValue] toString]
	dict set KV $key $value
    }
    return $KV
}

array set ::java::jvm [java::jvmProperties]

# set the global *array* ::tcljava
#  NOTE: it's an alias (alternative name) for java::jvm
# *DEPRECATED* use the java::jvm *array* instead.

upvar 0 ::java::jvm  ::tcljava

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































Deleted assets/tclJBlend2.0/javalock.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# javaLock.tcl --
#
# Maintain an internal pointer to java objects to control
# when the object is garbage collected.
#
# When a variable references a Java object, the internal rep
# points to a ReflectObject that contains the object. If an
# operation is performed on the variable that alters the
# internal rep (e.g. llength $x), the ReflectObject is
# destroyed and the Java object is garbage collected. By
# maintaining an internal pointer to the object, the
# java::lock and java::unlock commands can prevent the unwanted
# garbage collection of the Java object.
#
# Copyright (c) 1998 by Sun Microsystems, Inc.
# - 2016- ABU:  BUGFIX - java:lock doesn't lock with Tcl 8.6 - Now Fixed


# java::lock --
#
#	Make a copy of the TclObject and store it in
#	java::objLockedList. This will increment the
#	ref-count of the ReflectObject, preventing
#	garbage collection.
#
# Arguments:
#	javaObj : The java object to be locked.
#
# Results:
#	If the javaObj does not reference a valid java object
#	an error is generated by the call to java::isnull.


proc java::lock { javaObj } {
    global java::objLockedList

    # Copy string data into new object

    # ABU: this silly operation is a Fix for Tcl 8.6, ensuring that
    #  internal-rep of "copy" be a string (and not a TclObject).
    # Note that the older statement
    #    set copy [format "%s" $javaObj]
    # does does not work with Tcl 8.6.
    # This new statement works with 8.5 and 8.6
    set copy [format "%s%s" {} $javaObj]

    # Convert copy into a ReflectObject
    if {![java::isnull $copy]} {
        lappend java::objLockedList $copy
    }
    return $copy
}

# java::unlock --
#
#	Remove the reference to the Java object from the
#	java::objLockedList.  This will decrement the
#	ref-count by one.  It ref-count equals zero the
#	Java object will be garbage collected.
#
# Arguments:
#	javaObj : The Java object to be unlocked. The object
#		  should have been locked by a call to java::lock.
#		  The special string "all" is also accepted.
#
# Results:
#	An error is generated if the java::objLockedList
#	does not contain a java object or is not "all".

proc java::unlock { javaObj } {
    global java::objLockedList

    # check to see if the special "all" argument was given
    if {$javaObj eq "all"} {
	catch {unset java::objLockedList}
        return
    }

    # A null reference would no be in the locked list
    if {[java::isnull $javaObj]} {
        return
    }

    # Remove the copy of the reference.

    set index [lsearch -exact $java::objLockedList $javaObj]
    if {$index < 0} {
	error "unknown java object \"$javaObj\""
    } else {
	set java::objLockedList [lreplace $java::objLockedList $index $index]
    }
    return
}

# java::autolock --
#
#	The autolock comand is used to activate or deactivate
#	the automatic object locking feature. It can be called
#	with no arguments which will turn on the feature.
#	By default this feature is not activated.
#
# Arguments:
#	activate : a boolean condition to control if automatic
#		   locked will be used. Autolocking can be turned
#		   of by calling this command with the argument 0.
#
# Results:
#	If autolocking is turned off all objects that have been
#	locked will be released and objects will no longer be locked.

proc java::autolock { {activate 1} } {

    if {$activate} {
	if {[::info commands ::java::autolock_new] ne ""} {
	    error "autolocking has already been activated"
	}

	foreach cmd {new call field getinterp cast defineclass prop} {
	    rename ::java::$cmd ::java::autolock_$cmd

	    proc ::java::$cmd { args } \
    "java::autolock_create_instance \[eval java::autolock_$cmd \$args\]"
	}
    } else {
	if {[::info commands ::java::autolock_new] eq ""} {
	    error "autolocking has not been activated"
	}

	# restore names of the java commands
	foreach cmd {new call field getinterp cast defineclass prop} {
	    rename ::java::$cmd {}
	    rename ::java::autolock_$cmd ::java::$cmd
	}

	# unlock each instance that we autolocked earlier
	foreach cmd [::info commands ::java::autolock_java*] {
	    set javaObj [lindex [split $cmd _] 1]
	    java::autolock_destroy_instance $javaObj
	}
    }
}

# This is a private helper that is only used by java::autolock

proc java::autolock_create_instance { javaObj } {

    # See if this is really a reflected java object

    if {[catch {java::isnull $javaObj} err]} {
	# If it is not a java object just return the value
	return $javaObj
    } else {
	# If isnull returned true then return the null value
	if {$err == 1} {
	    return $javaObj
	}
    }

    # do nothing is object is already autolocked
    set cmd ::java::autolock_$javaObj

    if {[::info commands $cmd] eq $cmd} {
	return $javaObj
    }

    # lock the object reference
    java::lock $javaObj

    # rename the java instance command to the locked command
    rename ::$javaObj $cmd

    # create the locked instance command
    proc ::$javaObj { args } \
	"java::autolock_create_instance \[eval $cmd \$args\]"

    return $javaObj
}

# This is a private helper that is only used by java::autolock

proc java::autolock_destroy_instance { javaObj } {

    set cmd ::java::autolock_$javaObj

    if {[::info commands $cmd] ne $cmd} {
	error "can not find autolock instance command for $javaObj"
    }

    rename ::$javaObj {}
    rename $cmd ::$javaObj

    # unlock the object reference
    java::unlock $javaObj
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































Deleted assets/tclJBlend2.0/pkgIndex.tcl.

1
2
3
4
5
6
7
8
# tclJBlend pkgIndex.tcl for AndroWish

package ifneeded tclJBlend 2.0.0 [list apply {dir {
    load libtclJBlend[info sharedlibextension] tclblend
    source [file join $dir javalock.tcl]
    source [file join $dir javaUtils.tcl]
    package provide tclJBlend 2.0.0
}} $dir]
<
<
<
<
<
<
<
<
















Added assets/tclJBlend2.1/javaUtils.tcl.



























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# javaUtils.tcl --
#
# Collections of utilities


# java::jvmProperties --
#
#	Make a java::call to java.lang.System getProperties method
#	and store info about the JVM
#
# Results:
#	A tcl dictionary of about 50 key-values ..

proc java::jvmProperties {} {
    set KV [dict create]
    set props [java::call System getProperties]
    set names [$props propertyNames]
    while { [$names hasMoreElements] } {
	set key [[$names nextElement] toString]
	set value [$props getProperty $key]
	dict set KV $key $value
    }
    return $KV
}

# alternative, fastest .. ??
proc java::alt_jvmProperties {} {
    set KV [dict create]
    set props [java::call System getProperties]
    foreach entry [java::listify {java.util.Map.Entry} [$props entrySet]] {
	set key [[$entry getKey] toString]
	set value [[$entry getValue] toString]
	dict set KV $key $value
    }
    return $KV
}

array set ::java::jvm [java::jvmProperties]

# set the global *array* ::tcljava
#  NOTE: it's an alias (alternative name) for java::jvm
# *DEPRECATED* use the java::jvm *array* instead.

upvar 0 ::java::jvm  ::tcljava

Added assets/tclJBlend2.1/javalock.tcl.





































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# javaLock.tcl --
#
# Maintain an internal pointer to java objects to control
# when the object is garbage collected.
#
# When a variable references a Java object, the internal rep
# points to a ReflectObject that contains the object. If an
# operation is performed on the variable that alters the
# internal rep (e.g. llength $x), the ReflectObject is
# destroyed and the Java object is garbage collected. By
# maintaining an internal pointer to the object, the
# java::lock and java::unlock commands can prevent the unwanted
# garbage collection of the Java object.
#
# Copyright (c) 1998 by Sun Microsystems, Inc.
# - 2016- ABU:  BUGFIX - java:lock doesn't lock with Tcl 8.6 - Now Fixed


# java::lock --
#
#	Make a copy of the TclObject and store it in
#	java::objLockedList. This will increment the
#	ref-count of the ReflectObject, preventing
#	garbage collection.
#
# Arguments:
#	javaObj : The java object to be locked.
#
# Results:
#	If the javaObj does not reference a valid java object
#	an error is generated by the call to java::isnull.


proc java::lock { javaObj } {
    global java::objLockedList

    # Copy string data into new object

    # ABU: this silly operation is a Fix for Tcl 8.6, ensuring that
    #  internal-rep of "copy" be a string (and not a TclObject).
    # Note that the older statement
    #    set copy [format "%s" $javaObj]
    # does does not work with Tcl 8.6.
    # This new statement works with 8.5 and 8.6
    set copy [format "%s%s" {} $javaObj]

    # Convert copy into a ReflectObject
    if {![java::isnull $copy]} {
        lappend java::objLockedList $copy
    }
    return $copy
}

# java::unlock --
#
#	Remove the reference to the Java object from the
#	java::objLockedList.  This will decrement the
#	ref-count by one.  It ref-count equals zero the
#	Java object will be garbage collected.
#
# Arguments:
#	javaObj : The Java object to be unlocked. The object
#		  should have been locked by a call to java::lock.
#		  The special string "all" is also accepted.
#
# Results:
#	An error is generated if the java::objLockedList
#	does not contain a java object or is not "all".

proc java::unlock { javaObj } {
    global java::objLockedList

    # check to see if the special "all" argument was given
    if {$javaObj eq "all"} {
	catch {unset java::objLockedList}
        return
    }

    # A null reference would no be in the locked list
    if {[java::isnull $javaObj]} {
        return
    }

    # Remove the copy of the reference.

    set index [lsearch -exact $java::objLockedList $javaObj]
    if {$index < 0} {
	error "unknown java object \"$javaObj\""
    } else {
	set java::objLockedList [lreplace $java::objLockedList $index $index]
    }
    return
}

# java::autolock --
#
#	The autolock comand is used to activate or deactivate
#	the automatic object locking feature. It can be called
#	with no arguments which will turn on the feature.
#	By default this feature is not activated.
#
# Arguments:
#	activate : a boolean condition to control if automatic
#		   locked will be used. Autolocking can be turned
#		   of by calling this command with the argument 0.
#
# Results:
#	If autolocking is turned off all objects that have been
#	locked will be released and objects will no longer be locked.

proc java::autolock { {activate 1} } {

    if {$activate} {
	if {[::info commands ::java::autolock_new] ne ""} {
	    error "autolocking has already been activated"
	}

	foreach cmd {new call field getinterp cast defineclass prop} {
	    rename ::java::$cmd ::java::autolock_$cmd

	    proc ::java::$cmd { args } \
    "java::autolock_create_instance \[eval java::autolock_$cmd \$args\]"
	}
    } else {
	if {[::info commands ::java::autolock_new] eq ""} {
	    error "autolocking has not been activated"
	}

	# restore names of the java commands
	foreach cmd {new call field getinterp cast defineclass prop} {
	    rename ::java::$cmd {}
	    rename ::java::autolock_$cmd ::java::$cmd
	}

	# unlock each instance that we autolocked earlier
	foreach cmd [::info commands ::java::autolock_java*] {
	    set javaObj [lindex [split $cmd _] 1]
	    java::autolock_destroy_instance $javaObj
	}
    }
}

# This is a private helper that is only used by java::autolock

proc java::autolock_create_instance { javaObj } {

    # See if this is really a reflected java object

    if {[catch {java::isnull $javaObj} err]} {
	# If it is not a java object just return the value
	return $javaObj
    } else {
	# If isnull returned true then return the null value
	if {$err == 1} {
	    return $javaObj
	}
    }

    # do nothing is object is already autolocked
    set cmd ::java::autolock_$javaObj

    if {[::info commands $cmd] eq $cmd} {
	return $javaObj
    }

    # lock the object reference
    java::lock $javaObj

    # rename the java instance command to the locked command
    rename ::$javaObj $cmd

    # create the locked instance command
    proc ::$javaObj { args } \
	"java::autolock_create_instance \[eval $cmd \$args\]"

    return $javaObj
}

# This is a private helper that is only used by java::autolock

proc java::autolock_destroy_instance { javaObj } {

    set cmd ::java::autolock_$javaObj

    if {[::info commands $cmd] ne $cmd} {
	error "can not find autolock instance command for $javaObj"
    }

    rename ::$javaObj {}
    rename $cmd ::$javaObj

    # unlock the object reference
    java::unlock $javaObj
}

Added assets/tclJBlend2.1/pkgIndex.tcl.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
# tclJBlend pkgIndex.tcl for AndroWish

package ifneeded tclJBlend 2.1.0 [list apply {dir {
    load libtclJBlend[info sharedlibextension] tclblend
    source [file join $dir javalock.tcl]
    source [file join $dir javaUtils.tcl]
    package provide tclJBlend 2.1.0
}} $dir]

Changes to jni/tclJBlend/Android.mk.

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
	src/native/javaList.c \
	src/native/javaNotifier.c \
	src/native/javaTimer.c \
	src/native/javaUtil.c

LOCAL_CFLAGS := $(tcl_cflags) \
	-DPACKAGE_NAME="\"tclJBlend\"" \
	-DPACKAGE_VERSION="\"2.0.0\"" \
	-O2

LOCAL_SHARED_LIBRARIES := libtcl libmain

LOCAL_LDLIBS :=

include $(BUILD_SHARED_LIBRARY)







|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
	src/native/javaList.c \
	src/native/javaNotifier.c \
	src/native/javaTimer.c \
	src/native/javaUtil.c

LOCAL_CFLAGS := $(tcl_cflags) \
	-DPACKAGE_NAME="\"tclJBlend\"" \
	-DPACKAGE_VERSION="\"2.1.0\"" \
	-O2

LOCAL_SHARED_LIBRARIES := libtcl libmain

LOCAL_LDLIBS :=

include $(BUILD_SHARED_LIBRARY)

Changes to jni/tclJBlend/configure.

1
2
3
4
5
6
7
8
9
10
...
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
....
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
....
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
....
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
....
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
....
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
....
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for tclJBlend 2.0.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
................................................................................
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='tclJBlend'
PACKAGE_TARNAME='tcljblend'
PACKAGE_VERSION='2.0.0'
PACKAGE_STRING='tclJBlend 2.0.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
................................................................................
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures tclJBlend 2.0.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
................................................................................

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of tclJBlend 2.0.0:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
tclJBlend configure 2.0.0
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
................................................................................
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_mongrel
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by tclJBlend $as_me 2.0.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
................................................................................
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by tclJBlend $as_me 2.0.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
................................................................................

Report bugs to the package provider."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
tclJBlend config.status 2.0.0
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."



|







 







|
|







 







|







 







|







 







|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
...
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
....
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
....
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
....
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
....
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
....
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
....
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for tclJBlend 2.1.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
................................................................................
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='tclJBlend'
PACKAGE_TARNAME='tcljblend'
PACKAGE_VERSION='2.1.0'
PACKAGE_STRING='tclJBlend 2.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
................................................................................
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures tclJBlend 2.1.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
................................................................................

  cat <<\_ACEOF
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of tclJBlend 2.1.0:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
tclJBlend configure 2.1.0
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
................................................................................
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_mongrel
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by tclJBlend $as_me 2.1.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
................................................................................
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by tclJBlend $as_me 2.1.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
................................................................................

Report bugs to the package provider."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
tclJBlend config.status 2.1.0
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

Changes to jni/tclJBlend/configure.ac.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
# set as provided.  These will also be added as -D defs in your Makefile
# so you can encode the package version directly into the source files.
# This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME>
# so that we create the export library with the dll.
#-----------------------------------------------------------------------

AC_INIT([tclJBlend], [2.0.0])

#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------








|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
# set as provided.  These will also be added as -D defs in your Makefile
# so you can encode the package version directly into the source files.
# This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME>
# so that we create the export library with the dll.
#-----------------------------------------------------------------------

AC_INIT([tclJBlend], [2.1.0])

#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------

Changes to jni/tclJBlend/docs/Topics/BuildTclBlend.html.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
36
37
38
39
40
41
42
43
44
45



46
47
48
49
50
51
52
53
54
55
56
57
..
83
84
85
86
87
88
89
90
91
92
93

<H3>Building JBlend under Windows/Linux/MacOS</H3>

<HR>

<H4>Sources and Tools</H4>
<UL>
<li>Download the <A HREF="https://sourceforge.net/projects/irrational-numbers/files/tclJBlend-devkit-2.0.0b1.zip">
JBlend Development-Kit</A>, or better download the last version from the
<A HREF="https://sourceforge.net/p/irrational-numbers/code/HEAD/tree/pkgs/tclJBlend-devkit">
SourceForge SVN repository</A>

<LI> You need a JDK (>= 1.4)
<LI> On Unix (Linux/Mac) you will use the GNU/C compiler.
<LI> On Windows you can download MingW , or you can use the free "MS Visual Studio 2005 Community Edition".
</UL>

<H4>Building on Windows (using a MS C Compiler)</H4>

<PRE><code>
   cd ...\tclJBlend-devkit
................................................................................
   cd .../tclJBlend-devkit
   ./build.sh x32
   ./build.sh x64
</code></PRE>

<P> 
By default intermediate results will be saved under the XBUILD subdirectory;
 XBUILD/tclJBlend contains the deliverable package.
<P>If you use a shared disk for building, you can attach it to Win/Linux/Mac so
that XBUILD/tclJBlend will collect all the native DLL/.so/.dylib so far built.




<H4>Extra settings for Building customizations</H4>

<P>
You can change the build procedure in a limited way, just by
setting some environment variables or passing'em on the fly on the command
line of the build script.
<P>
<B>Allowed  settings:</B>
<PRE><code>
  CFLAGS        (Options for C-compiler)
  JCFLAGS       (Options for javac.exe)
................................................................................
<PRE><code>
CFLAGS=-DTCLBLEND_DEBUG=1
</code></PRE>

<P><P>
<hr>
<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>

</BODY>
</HTML>







|





|







 







|

|
>
>
>




|







 







|



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
..
86
87
88
89
90
91
92
93
94
95
96

<H3>Building JBlend under Windows/Linux/MacOS</H3>

<HR>

<H4>Sources and Tools</H4>
<UL>
<li>Download the <A HREF="https://sourceforge.net/projects/irrational-numbers/files/JBlend/tclJBlend-devkit-2.1.zip">
JBlend Development-Kit</A>, or better download the last version from the
<A HREF="https://sourceforge.net/p/irrational-numbers/code/HEAD/tree/pkgs/tclJBlend-devkit">
SourceForge SVN repository</A>

<LI> You need a JDK (>= 1.4)
<LI> On Unix (Linux/Mac) you need the GNU/C compiler.
<LI> On Windows you can download MingW , or you can use the free "MS Visual Studio 2005 Community Edition".
</UL>

<H4>Building on Windows (using a MS C Compiler)</H4>

<PRE><code>
   cd ...\tclJBlend-devkit
................................................................................
   cd .../tclJBlend-devkit
   ./build.sh x32
   ./build.sh x64
</code></PRE>

<P> 
By default intermediate results will be saved under the XBUILD subdirectory;
 XBUILD/JBlend will contain the deliverable package (zip it and deliver it).
<P>If you use a shared disk for building, you can attach it to Win/Linux/Mac so
that XBUILD/JBlend will collect all the native DLL/.so/.dylib so far built.
<P>
If you need to build a JBlend+JVM bundle, read the detailed instruction in <B>tclJBlend-devkit/HowTO-AssembleJBlend+JVM.txt</B>


<H4>Extra settings for Building customizations</H4>

<P>
You can adapt the build procedure in a limited way, just by
setting some environment variables or passing'em on the fly on the command
line of the build script.
<P>
<B>Allowed  settings:</B>
<PRE><code>
  CFLAGS        (Options for C-compiler)
  JCFLAGS       (Options for javac.exe)
................................................................................
<PRE><code>
CFLAGS=-DTCLBLEND_DEBUG=1
</code></PRE>

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

</BODY>
</HTML>

Changes to jni/tclJBlend/docs/Topics/PlayWithTclBlend.html.

1
2
3
4
5








6
7
8
9
10
11
12


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<HTML>
<TITLE>
How to use the tclJBlend package
</TITLE>









<BODY>
<HR/>
<H3>
How to use the tclJBlend package
</H3>
<HR/>



What you need:
<UL>
<LI>Of course a Tcl interpreter : <B>tclsh</B> or <B>wish</B>, or even <B>tclkit</B> (see note below for valid versions)
<LI>A JVM: just a JRE, a JDK is not required.
</UL>

<P>
Supported Tcl versions are <B>8.5.X</B> and <B>8.6.X</B> (and further ..) , <B>excluding Tcl versions from 8.6.1 to 8.6.5</B>>
( see <A HREF=https://core.tcl.tk/tcl/tktview?name=07d13d99b0>Ticket 07d13d99b0</A> for full details).
<P>
It's not required JRE be 'installed' i.e. you don't need java.exe be in PATH,
nor other special variable such as JAVA_HOME need to be set 
(nor the JRE need to be registered in the Windows Registry').
<BR>
A big little <B>WARNING:</B> Don't mix 32/64 bit applications; Tcl and JVM should be 
both 32bit or both 64bit.

<LI>Download the last public release, unzip it and place it as a subdirectory of one of the Tcl 'lib' directories.
Alternatively, you can leave it 'out of Tcl', provided later you tell Tcl where TJB is placed.
Once you have all these components, before launching the Tcl interpreter,
you should add to LD_LIBRARY_PATH the directory containing "jvm.dll"
( or its equivalent "libjvm.so" (Linux) or "libjvm.dylib" (MacOs) ).
<BR>
Now you are ready to run ..


<H4>Running on Windows</H4>

Set LD_LIBRARY_PATH (in dos-notation or even in unix-notation) and launch Tcl
<PRE><CODE>
   DOS> set LD_LIBRARY_PATH="c:\MYJRE\bin\client;%LD_LIBRARY_PATH%"
   DOS> tclsh
</CODE></PRE>
then type the following Tcl commands
<PRE><CODE>
   # Uncomment and adapt the following line if TJB is not placed in a directory
   #  referenced by the auto_path variable.
   #
   # lappend auto_path ...where-is-TJB...
   #
   package require JBlend
    # create a Java object ( a java.lang.String )
   set x [java::new java.lang.String "Hello Tcl ! I'm a Java String"]
    # call the "toUpperCase" java-method
   set res [$x toUpperCase]
   puts $res
   ....
</CODE></PRE>

Remember;
<UL>
<LI>Tcl and JVM should be both 32bit or both 64bit 
<LI>Tcl version must be <= 8.60 or >= 8.6.6
</UL>


<H4>Running on Linux</H4>

Set LD_LIBRARY_PATH and launch Tcl
<PRE><CODE>
   sh> LD_LIBRARY_PATH=".../jre1.7.0_80/lib/amd64/server:$LD_LIBRARY_PATH"
   sh> export LD_LIBRARY_PATH
   sh> tclsh
</CODE></PRE>
then type the (same) Tcl commands
<PRE><CODE>
   # Uncomment and adapt the following line if TJB is not placed in a directory
   #  referenced by the auto_path variable.
   #
   # lappend auto_path ...where-is-TJB...
   #
   package require JBlend
    # create a Java object ( a java.lang.String )
   set x [java::new java.lang.String "Hello Tcl ! I'm a Java String"]
    # call the "toUpperCase" java-method
   set res [$x toUpperCase]
   puts $res
   ....
</CODE></PRE>

<LI><B>Note:</B> it is important to set LD_LIBRARY_PATH <B>before</B> launching Tcl ; setting env(LD_LIBRARY_PATH) from inside Tcl would be easy, but it doesn't work !



<H4>Running on MacOS</H4>
Set LD_LIBRARY_PATH and launch Tcl
<PRE><CODE>
   sh> LD_LIBRARY_PATH="/Library/Internet Plugins/JavaAppletPlugin.plugin/Contents/Home/lib/server:$LD_LIBRARY_PATH"
   sh> export LD_LIBRARY_PATH
   sh> tclsh
</CODE></PRE>
then type the (same) Tcl commands
<PRE><CODE>
   # Uncomment and adapt the following line if TJB is not placed in a directory
   #  referenced by the auto_path variable.
   #
   # lappend auto_path ...where-is-TJB...
   #
   package require JBlend
    # create a Java object ( a java.lang.String )
   set x [java::new java.lang.String "Hello Tcl ! I'm a Java String"]
    # call the "toUpperCase" java-method
   set res [$x toUpperCase]
   puts $res
   ....
</CODE></PRE>
<LI><B>Note:</B> it is important to set LD_LIBRARY_PATH *before* launching Tcl ; setting env(LD_LIBRARY_PATH) from inside Tcl would be easy, but it doesn't work !

<P><P>
<hr>
<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>

</BODY>
</HTML>





>
>
>
>
>
>
>
>







>
>



|






|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127



128
129
130
131
132
133
134
<HTML>
<TITLE>
How to use the tclJBlend package
</TITLE>

<style type="text/css"><!--
    PRE.example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
--></style>

<BODY>
<HR/>
<H3>
How to use the tclJBlend package
</H3>
<HR/>

<H4>Before starting..</H4>

What you need:
<UL>
<LI>Of course a Tcl interpreter : <B>tclsh</B> or <B>wish</B>, or even <B>tclkit</B> (see note below for valid versions)
<LI>(optional, yet recommended) A JavaVM: just a JRE, a JDK is not required.
</UL>

<P>
Supported Tcl versions are <B>8.5.X</B> and <B>8.6.X</B> (and further ..) , <B>excluding Tcl versions from 8.6.1 to 8.6.5</B>>
( see <A HREF=https://core.tcl.tk/tcl/tktview?name=07d13d99b0>Ticket 07d13d99b0</A> for full details).
<P>
About the JavaVM, you can use any JRE already 'present' on your system ; it's not required JRE be 'installed' i.e. you don't need java.exe be in PATH,
nor other special variable such as JAVA_HOME need to be set 
(nor the JRE need to be registered in the Windows Registry').


<H4>Download JBlend or JBlend+JVM</H4>

Download from <A HREF=https://sourceforge.net/projects/irrational-numbers/files/JBlend/>Sourceforge</A> 
the last public release.
You can choose among the following variants:
<UL>
<LI><B>JBlend-2.x.zip</B> - a multiplatform package (Win/Mac/Linux). It requires an external JRE.
<LI><B>JBlend+JVM-win-x64-2.x.zip</B> - JBlend plus an embedded JVM for Windows x64
<LI><B>JBlend+JVM-linux-x64-2.x.zip</B> - JBlend plus an embedded JVM for Linux x64
<LI><B>JBlend+JVM-darwin-x64-2.x.zip</B> - JBlend plus an embedded JVM for MacOS x64
</UL>

Please note that the os (win/linux/darwin) and the architecture (x32/x64) of the JBlend+JVM distro must match with the os/architecture of your Tcl Interpreter,
and so the os/architecture of the optional, external JVM you choose to 'link' to JBlend.


<H4>Install and configure</H4>
<P>
Unzip the downloaded package and place it as a subdirectory of one of the Tcl 'lib' directories.
Alternatively, you can leave it 'out of Tcl'  (e.g. in a temporary directory just for testing), provided later you tell Tcl where JBlend is placed.
</P>
<P>
If you downloaded and installed (unzip) a JBlend+JVM distro, you are ready to run, <BR/>
otherwise you should tell JBlend where your JRE is located, or more precisely, 
where the Java dynamic library <B>jvm.dll</B> ( or <B>libjvm.so</B> (Linux) or <B>libjvm.dylib</B> (MacOS) ) is located.
<BR/>
There are two ways to configure JBlend, as explained in the next section.
</P>


<H4>Configuring JBlend</H4>
<P>
<I>You can skip this section if you downloaded JBlend+JVM, or if you are not interested in using an external JRE</I>
</P>
<P>
There are two ways to configure JBlend, that is, to link JBlend with an external JRE: 
</P>

<UL>
<LI> <B>On-fly configuration</B><BR/>
<P>
In a running Tcl interpreter, before loading the JBlend package,
set the global variable <B>::JBlend_JVM</B> pointing to the jvm.dll (or libjvm.so ...).
</P>
Example:
<PRE class=example>
 # always specify pathnames in Unix notation.
set ::JBlend_JVM Z:/myJRE/lib/amd64/server/jvm.dll
....
package require JBlend 2.1

</PRE>

<LI> <B>Hard-coded configuration</B><BR/>
<P>
Edit the <B>JBLend/JVMcfg.tcl</B> file 
<I>(if it does not exist yet, copy <B>JBlend/__JVMcfg.tcl</B> to <B>JBlend/JVMcfg.tcl</B>)</I>
and insert the full pathname of jvm.dll (or libjvm.so ...). You can read detailed instructions within the file itself.
</P>

</UL>

<P>
Now you are ready to run ..
</P>


<H4>Running JBlend</H4>
<P>
Once you properly installed and (optionally) configured <B>JVMcfg.tcl</B>, you just need
<PRE class=example>
   # Uncomment and adapt the following line if JBlend is not placed in a directory
   #  referenced by the auto_path variable.
   #
   # lappend auto_path ...where-is-JBlend..
   #
   package require JBlend

....
</PRE>
that's all!
</P>
<P>
Note that even if the special global variable <B>::JBlend_JVM</B> is hard-coded in the configuration file <B>JBlend/JVMcfg.tcl</B>,
if you set this variable somewhere before loading the JBlend package, this new value takes the precedence
over the hard-coded configuration.<BR/>
If you want to be sure to use the hard-coded configuration, unset the variable before loading the package
</P>





<P><P>
<hr>
<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>

</BODY>
</HTML>

Changes to jni/tclJBlend/docs/Topics/WhatsNew.html.

9
10
11
12
13
14
15
16
17
18
19
20
21

22
23
24
25
26
27
28
..
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
...
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
131
132
133
134
135
136
137




















138
139
140
141
142
143
144
<H3>
What's new in JBlend?
</H3>

<HR>

<ul>
<li><A HREF=#2.0.0b1>Last Version</A></li>
<li></li>
<li><A HREF="#TCLBLEND141">The Ancestor: TclBlend 1.4.1</A></li>
<li><A HREF="#2.0.0a1">JBlend 2.0.0a1</A></li>
<li><A HREF="#2.0.0a2">JBlend 2.0.0a2</A></li>
<li><A HREF="#2.0.0b1">JBlend 2.0.0b1</A></li>

</ul>

<HR>

<DL>
 <DT>
 <H3><A NAME="TCLBLEND141">The Ancestor: TclBlend 1.4.1</A></H3>
................................................................................

<LI><B>Simplified Build:</B>JBlend must be easy to build for all the above platforms.

<LI><B>Binary portability:</B>Once built, JBlend must be installable on any of the above platforms.
Of course these target machines should be equipped with *any* Tcl-interpreter and *any* Java VM 
(well, see below for minimum requirements)

<LI><B>Easy enviroment upgrading:</B>Once installed, you are also free to 
change/upgrade the underlyng Tcl or JVM - again, with no need to rebuild JBlend .

</UL> 
<P>
To achieve these goals JBlend lost the TclBlend/Tcljava ability to act as a 
bidirectional bridge between a JVM and a Tcl interpreter; JBlend can be used
only in one way, from Tcl to Java and not in the opposite direction.
For many Tcl users like me, this is enough ;-).
................................................................................


<DL> 
 <DT><H3><A NAME="2.0.0b1">JBlend 2.0.0b1</A></H3></DT>
 <DD>

<P>
Version 2.0.0b1 is fixes some bugs (some still present in TclBlend 1.4.1), 
provides documentation for Users  and Developers, and starts providing a basic (greatly incomplete)
test suite.
<UL>
<LI>BUGFIX: * Java resources cannot be found *  Serious bug inherithed by TclBlend 1.4.1 . Now fixed.
<LI>BUGFIX: * java::lock/unlock commands don't work with Tcl 8.6 - Now fixed.>
<LI>Added command java::isobject
<LI>Added command java::listify
................................................................................
<LI>Delivered documentation for Users and Developers
<LI>Starting Test suite
</UL>
<UL>
<H4>TO DO</H4>
<LI>Test-suite still incomplete; need to adapt the original TclBlend test-suite.
</UL>




















</DD>
</DL>


</BODY>
</HTML>








|





>







 







|
|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
...
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<H3>
What's new in JBlend?
</H3>

<HR>

<ul>
<li><A HREF=#2.1>Last Version</A></li>
<li></li>
<li><A HREF="#TCLBLEND141">The Ancestor: TclBlend 1.4.1</A></li>
<li><A HREF="#2.0.0a1">JBlend 2.0.0a1</A></li>
<li><A HREF="#2.0.0a2">JBlend 2.0.0a2</A></li>
<li><A HREF="#2.0.0b1">JBlend 2.0.0b1</A></li>
<li><A HREF="#2.1">JBlend 2.1</A></li>
</ul>

<HR>

<DL>
 <DT>
 <H3><A NAME="TCLBLEND141">The Ancestor: TclBlend 1.4.1</A></H3>
................................................................................

<LI><B>Simplified Build:</B>JBlend must be easy to build for all the above platforms.

<LI><B>Binary portability:</B>Once built, JBlend must be installable on any of the above platforms.
Of course these target machines should be equipped with *any* Tcl-interpreter and *any* Java VM 
(well, see below for minimum requirements)

<LI><B>Easy environment upgrading:</B>Once installed, you are also free to 
change/upgrade the underlying Tcl or JVM - again, with no need to rebuild JBlend .

</UL> 
<P>
To achieve these goals JBlend lost the TclBlend/Tcljava ability to act as a 
bidirectional bridge between a JVM and a Tcl interpreter; JBlend can be used
only in one way, from Tcl to Java and not in the opposite direction.
For many Tcl users like me, this is enough ;-).
................................................................................


<DL> 
 <DT><H3><A NAME="2.0.0b1">JBlend 2.0.0b1</A></H3></DT>
 <DD>

<P>
Version 2.0.0b1 fixes some bugs (some still present in TclBlend 1.4.1), 
provides documentation for Users  and Developers, and starts providing a basic (greatly incomplete)
test suite.
<UL>
<LI>BUGFIX: * Java resources cannot be found *  Serious bug inherithed by TclBlend 1.4.1 . Now fixed.
<LI>BUGFIX: * java::lock/unlock commands don't work with Tcl 8.6 - Now fixed.>
<LI>Added command java::isobject
<LI>Added command java::listify
................................................................................
<LI>Delivered documentation for Users and Developers
<LI>Starting Test suite
</UL>
<UL>
<H4>TO DO</H4>
<LI>Test-suite still incomplete; need to adapt the original TclBlend test-suite.
</UL>
</DD>
</DL>


<DL> 
 <DT><H3><A NAME="2.1">JBlend 2.1</A></H3></DT>
 <DD>

<P>
Version 2.1 comes with some intenal changes for an easier installation/configuration.</BR>
First distribution of JBlend+JVM bundles (for Linux and Windows).
<UL>
<LI>No more need to set the LD_LIBRARY environment variable before loading the package.
<LI>Internal code for launching the JVM is now more flexible; JVM.dll is linked at run-time (previously it was linked at load-time).
<LI>JBlend binary distributions now come with new variants (JBlend+JVM*.zip is JBlend plus an embedded JVM)
</UL>
<UL>
<H4>TO DO</H4>
<LI>Test-suite still incomplete - many test-cases to add ; 3 broken test-cases (low priority)
</UL>
</DD>
</DL>


</BODY>
</HTML>

Changes to jni/tclJBlend/docs/index.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>JBlend - Tcl/Java Integration Manual</title>
</head>
<body>
<hr>
<h3>JBlend - Tcl/Java Integration Manual</h3>
<hr>

<h4>What is JBlend</H4>
<li>
JBlend is a Tcl package that provides access to Java classes from Tcl.
JBlend is a fork of the <A HREF=wiki.tcl.tk/TclBlend>TclBlend project</A>
</li>

<h4>Download</H4>
<li>
Prebuilt multiplatform binary packages are available at <A HREF=https://sourceforge.net/projects/irrational-numbers/files/tclJBlend-2.0.0b1.zip]>Sourceforge</A>
</li>
<li>
You can also download the <A HREF=https://sourceforge.net/projects/irrational-numbers/files/tclJBlend-devkit-2.0.0a2.zip>development kit</A> (only for developers/maintaners)
</li>


<h4>What's new</H4>
<li>
<B>JBlend</B> is currently under development; see here <A HREF=Topics/WhatsNew.html>what's new</A>
</li>

<h4>How to play with run JBlend</H4>
<li>
See detailed <A HREF=Topics/PlayWithTclBlend.html>preliminary settings</A> for playing with JBlend on Windows/Linux/Mac.
</li>

<h4>How to build JBlend</H4>
<li>
See detailed <A HREF=Topics/BuildTclBlend.html>instruction</A> for building on Windows/Linux/Mac.
</li>

<h4>JBlend commands</H4>
<li>
These are the commands a Tcl programmer would use to interact with Java
from Tcl.
Click here for the full <A HREF=TclJava/contents.html>reference manual</A>
</LI>

<h4>JBlend API commands</H4>
<li>
Here is the <A HREF=TclJavaLib/contents.htm>JBlend library</A> that Java programmers can use to extend Tcl.<br>
</li>


<h4>Equivalent C Functions</H4>
<li>
A <A HREF=cFunctions.html>listing of C Library functions</A> and their equivalent Java
classes and methods.
</li>


<P><P>
<hr>
<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>
</body>
</html>



|



|


|

|
|

<
<
<
<
<
<
<
<
<






|

|


|




|






|





|









|


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15









16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>JBlend 2.1 - Tcl/Java Integration Manual</title>
</head>
<body>
<hr>
<h3>JBlend 2.1 - Tcl/Java Integration Manual</h3>
<hr>

<h4>What is JBlend</h4>
<li>
<A HREF=https://wiki.tcl-lang.org/TclJBlend>JBlend</A> is a Tcl package that provides access to Java classes from Tcl.
JBlend is a fork of the <A HREF=https://wiki.tcl-lang.org/TclBlend>TclBlend project</A>
</li>










<h4>What's new</H4>
<li>
<B>JBlend</B> is currently under development; see here <A HREF=Topics/WhatsNew.html>what's new</A>
</li>

<h4>How to play with JBlend</h4>
<li>
See detailed <A HREF=Topics/PlayWithTclBlend.html>instruction for installing/configuring JBlend</A> on any supported target (Windows/Linux/Mac).
</li>

<h4>How to build JBlend</h4>
<li>
See detailed <A HREF=Topics/BuildTclBlend.html>instruction</A> for building on Windows/Linux/Mac.
</li>

<h4>JBlend commands</h4>
<li>
These are the commands a Tcl programmer would use to interact with Java
from Tcl.
Click here for the full <A HREF=TclJava/contents.html>reference manual</A>
</LI>

<h4>JBlend API commands</h4>
<li>
Here is the <A HREF=TclJavaLib/contents.htm>JBlend library</A> that Java programmers can use to extend Tcl.<br>
</li>


<h4>Equivalent C Functions</h4>
<li>
A <A HREF=cFunctions.html>listing of C Library functions</A> and their equivalent Java
classes and methods.
</li>


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

Changes to jni/tclJBlend/src/native/javaCmd.c.

675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
            &tsdPtr->currentEnv, &vm_args) < 0) {

#ifdef TCLBLEND_DEBUG
    fprintf(stderr, "TCLBLEND_DEBUG: JNI_CreateJavaVM failed\n");
#endif /* TCLBLEND_DEBUG */

	    Tcl_AppendResult(interp, "JNI_CreateJavaVM failed. ",
                                     "Please check \"tclblend_init\" settings and if your JVM is compatible with the Tcl interpreter (i.e. both 32 bit or bot 64 bit)\n",
                                     NULL);
            appendClasspathMessage(interp);
            goto error;
	}

        /* Create a thread exit handler that will destroy the JVM */








|







675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
            &tsdPtr->currentEnv, &vm_args) < 0) {

#ifdef TCLBLEND_DEBUG
    fprintf(stderr, "TCLBLEND_DEBUG: JNI_CreateJavaVM failed\n");
#endif /* TCLBLEND_DEBUG */

	    Tcl_AppendResult(interp, "JNI_CreateJavaVM failed. ",
                                     "Please check \"tclblend_init\" settings and if your JVM is compatible with the Tcl interpreter (i.e. both 32 bit or both 64 bit)\n",
                                     NULL);
            appendClasspathMessage(interp);
            goto error;
	}

        /* Create a thread exit handler that will destroy the JVM */

Changes to jni/tclJBlend/src/tcljava/tcl/lang/JavaListifyCmd.java.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

package tcl.lang;

import java.util.Collection;
import java.util.Iterator;
import java.util.Enumeration;

/* OCCHIO!!!
ora solo per Collection   ( o meglio Iterable ?? )
no array, perche' c'e gia' getrange ..

Enumeration
An enumeration is an object that generates elements one at a time. It is used for passing through a collection, usually of unknown size.
The traversing of elements can only be done once per creation.
*/

class JavaListifyCmd implements Command {


private static boolean isBasic (Class cls) {
    if (
	   (cls == Integer.class) ||
	   (cls == Long.class)    ||
	   (cls == Short.class)   ||
	   (cls == Byte.class)    ||







<
<
<

<
<
<
<
<

<







6
7
8
9
10
11
12



13





14

15
16
17
18
19
20
21

package tcl.lang;

import java.util.Collection;
import java.util.Iterator;
import java.util.Enumeration;










class JavaListifyCmd implements Command {


private static boolean isBasic (Class cls) {
    if (
	   (cls == Integer.class) ||
	   (cls == Long.class)    ||
	   (cls == Short.class)   ||
	   (cls == Byte.class)    ||

Changes to jni/tclJBlend/tests/JBlend/JavaNewCmd.test.

843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
....
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
....
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
}
Expected: [list \
    0.0 \
    -0.0 \
    Infinity \
    -Infinity \
    NaN \
    0.0010 \
    1.0E9 \
    $pmin \
    1 {double value too large to represent in a float} \
    $pmax \
    1 {double value too large to represent in a float} \
]

................................................................................
set max [java::field Double MAX_VALUE]
# FIXME: Tcl rolls small double values over to zero
set smin "5.0e-350"
set bmax "2.0e350"
set pmin 4.9E-324
set pmax 1.7976931348623157E308

Name: javaNewCmd-7.14
Description: {parse Java type from String}
Test: {
    list \
        [[java::new Double 0.0] toString] \
        [[java::new Double -0.0] toString] \
        [[java::new Double Infinity] toString] \
        [[java::new Double -Infinity] toString] \
................................................................................
}
Expected: [list \
    0.0 \
    -0.0 \
    Infinity \
    -Infinity \
    NaN \
    0.0010 \
    1.0E9 \
    $pmin \
    $pmax \
]


# === cleanup ========================================

::tcltest::cleanupTests
return








|







 







|







 







|











843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
....
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
....
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
}
Expected: [list \
    0.0 \
    -0.0 \
    Infinity \
    -Infinity \
    NaN \
    0.001 \
    1.0E9 \
    $pmin \
    1 {double value too large to represent in a float} \
    $pmax \
    1 {double value too large to represent in a float} \
]

................................................................................
set max [java::field Double MAX_VALUE]
# FIXME: Tcl rolls small double values over to zero
set smin "5.0e-350"
set bmax "2.0e350"
set pmin 4.9E-324
set pmax 1.7976931348623157E308

Name: javaNewCmd-7.18
Description: {parse Java type from String}
Test: {
    list \
        [[java::new Double 0.0] toString] \
        [[java::new Double -0.0] toString] \
        [[java::new Double Infinity] toString] \
        [[java::new Double -Infinity] toString] \
................................................................................
}
Expected: [list \
    0.0 \
    -0.0 \
    Infinity \
    -Infinity \
    NaN \
    0.001 \
    1.0E9 \
    $pmin \
    $pmax \
]


# === cleanup ========================================

::tcltest::cleanupTests
return

Changes to jni/tclJBlend/tests/README.txt.

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

package TTXN (TclTest eXtended Notation) is required.
It can be downloaded from
 http://irrational-numbers.googlecode.com/files/TTXN-1.0.1.zip

You should install TTXN under a tcl-library directory (recommended)
OR
you should place it within this "test" directory.


NOTES on test-run
=================
Before running tests, you should set the LD_LIBRARY_PATH env-var ...


You can run a single test from the OS shell, as follows:

    tclsh .../test/helper   .../test/xxx.test

or

You can run all tests
    tclsh ..../test/all.tcl
               







|


|
|
<
<



|




|

2
3
4
5
6
7
8
9
10
11
12
13


14
15
16
17
18
19
20
21
22
23

package TTXN (TclTest eXtended Notation) is required.
It can be downloaded from
 http://irrational-numbers.googlecode.com/files/TTXN-1.0.1.zip

You should install TTXN under a tcl-library directory (recommended)
OR
you should place it within this "tests" directory.


How to run tests
================



You can run a single test from the OS shell, as follows:

    tclsh .../tests/helper   .../tests/xxx.test

or

You can run all tests
    tclsh ..../tests/all.tcl
               

Changes to jni/tclJBlend/tests/check-env.test.

1
2
3
4
5
6
7
8
9
10
11
# check-env.test --
#
#	Dummy test file ...
#   Just check if the environment (Tcl, JVM, ..) has been properlyset.
#

package require TTXN
  # package under test is JBlend 2.0
package require JBlend 2.0





|







1
2
3
4
5
6
7
8
9
10
11
# check-env.test --
#
#	Dummy test file ...
#   Just check if the environment (Tcl, JVM, ..) has been properly set.
#

package require TTXN
  # package under test is JBlend 2.0
package require JBlend 2.0