6 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD $JVM @JVM_ARGS $JAVALIB);
12 @ISA = qw(Exporter DynaLoader);
63 CallNonvirtualObjectMethod
64 CallNonvirtualObjectMethodA
65 CallNonvirtualBooleanMethod
66 CallNonvirtualBooleanMethodA
67 CallNonvirtualByteMethod
68 CallNonvirtualByteMethodA
69 CallNonvirtualCharMethod
70 CallNonvirtualCharMethodA
71 CallNonvirtualShortMethod
72 CallNonvirtualShortMethodA
73 CallNonvirtualIntMethod
74 CallNonvirtualIntMethodA
75 CallNonvirtualLongMethod
76 CallNonvirtualLongMethodA
77 CallNonvirtualFloatMethod
78 CallNonvirtualFloatMethodA
79 CallNonvirtualDoubleMethod
80 CallNonvirtualDoubleMethodA
81 CallNonvirtualVoidMethod
82 CallNonvirtualVoidMethodA
103 CallStaticObjectMethod
104 CallStaticObjectMethodA
105 CallStaticBooleanMethod
106 CallStaticBooleanMethodA
108 CallStaticByteMethodA
110 CallStaticCharMethodA
111 CallStaticShortMethod
112 CallStaticShortMethodA
116 CallStaticLongMethodA
117 CallStaticFloatMethod
118 CallStaticFloatMethodA
119 CallStaticDoubleMethod
120 CallStaticDoubleMethodA
122 CallStaticVoidMethodA
125 GetStaticBooleanField
134 SetStaticBooleanField
150 GetObjectArrayElement
151 SetObjectArrayElement
160 GetBooleanArrayElements
163 GetShortArrayElements
166 GetFloatArrayElements
167 GetDoubleArrayElements
168 GetBooleanArrayRegion
176 SetBooleanArrayRegion
194 # This AUTOLOAD is used to 'autoload' constants from the constant()
195 # XS function. If a constant is not found then control is passed
196 # to the AUTOLOAD in AutoLoader.
199 ($constname = $AUTOLOAD) =~ s/.*:://;
200 my $val = constant($constname, @_ ? $_[0] : 0);
202 if ($!{EINVAL} || $! =~ /Invalid/) {
203 $AutoLoader::AUTOLOAD = $AUTOLOAD;
204 goto &AutoLoader::AUTOLOAD;
207 croak "Your vendor has not defined JNI macro $constname";
210 eval "sub $AUTOLOAD { $val }";
214 bootstrap JNI $VERSION;
216 if (not $JPL::_env_) {
217 $ENV{JAVA_HOME} ||= "/usr/local/java";
219 chop(my $arch = `uname -p`);
220 chop($arch = `uname -m`) unless -d "$ENV{JAVA_HOME}/lib/$arch";
222 my @CLASSPATH = split(/:/, $ENV{CLASSPATH});
223 @CLASSPATH = "." unless @CLASSPATH;
225 "$ENV{JAVA_HOME}/classes",
226 "$ENV{JAVA_HOME}/lib/classes.zip";
227 $ENV{CLASSPATH} = join(':', @CLASSPATH);
229 $ENV{THREADS_TYPE} ||= "green_threads";
231 $JAVALIB = "$ENV{JAVA_HOME}/lib/$arch/$ENV{THREADS_TYPE}";
232 $ENV{$Config{ldlibpthname}} .= ":$JAVALIB";
234 $JVM = GetJavaVM("$JAVALIB/libjava.so",@JVM_ARGS);
242 JNI - Perl encapsulation of the Java Native Interface
250 =head1 Exported constants
263 Copyright 1998, O'Reilly & Associates, Inc.
265 This package may be copied under the same terms as Perl itself.