This code will generate external references to JNI 'C' function entry point versions of Java JNI native methods. These, in turn, are designed to be stored into a shared object. They reference JNI 'C' function entry point versions of Java JNI local native methods (because of the fact that they are java.lang.*
classes). For anything besides java.lang.*
, these references would be to regular JNI 'C' or 'C++' or Fortran or assembly or COBOL (gulp) or whatever kind of library code is appropriate.
The point with this sample main() program
is to create a sample program fragment that shows where the JNI shared object fits into the overall scheme of things. The functions they reference demonstrate how to reference JNI local native methods in the core JVM code.
Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
Definition in file sampleJNImain.c.
#include <stdlib.h>
#include <jni.h>
#include "java_lang_Object.h"
#include "java_lang_Class.h"
#include "java_lang_String.h"
#include "java_lang_Thread.h"
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv, char **envp) |
Variables | |
jboolean | boolean_value = JNI_FALSE |
jclass | clsidx_null = 0 |
JNIEnv | env |
jlong | long_int = 0 |
jobject | objhash_null = 0 |
jint | regular_int = 0 |
|
|
Definition at line 63 of file sampleJNImain.c. Referenced by main(). |
|
Definition at line 65 of file sampleJNImain.c. Referenced by main(). |
|
Definition at line 66 of file sampleJNImain.c. Referenced by main(). |
|
Definition at line 67 of file sampleJNImain.c. Referenced by main(). |
|
Definition at line 68 of file sampleJNImain.c. Referenced by main(). |
|
Definition at line 69 of file sampleJNImain.c. Referenced by main(). |