Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 115828 Details for
Bug 173915
generation-2 does not set LD_LIBRARY_PATH correctly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
jni-test.cpp
jni-test.cpp (text/plain), 909 bytes, created by
Alon Bar-Lev (RETIRED)
on 2007-04-09 14:45:55 UTC
(
hide
)
Description:
jni-test.cpp
Filename:
MIME Type:
Creator:
Alon Bar-Lev (RETIRED)
Created:
2007-04-09 14:45:55 UTC
Size:
909 bytes
patch
obsolete
> >#include <cstdlib> >#include <cstdio> >#include <string.h> >#include <jni.h> > >int main () { > JavaVM *jvm; > JNIEnv *env; > JDK1_1InitArgs vm_args; > memset (&vm_args, 0, sizeof (vm_args)); > vm_args.version = JNI_VERSION_1_4; > JNI_GetDefaultJavaVMInitArgs (&vm_args); > if (JNI_CreateJavaVM (&jvm, (void **)&env, &vm_args) != 0) { > fprintf (stderr, "Cannot initialize jvm\n"); > exit (1); > } > jclass clsSystem = env->FindClass("java/lang/System"); > jclass clsPrintStream = env->FindClass("java/io/PrintStream"); > jfieldID midOut = env->GetStaticFieldID(clsSystem, "out", "Ljava/io/PrintStream;"); > jobject objOut = env->GetStaticObjectField(clsSystem, midOut); > jmethodID midPrintln = env->GetMethodID(clsPrintStream, "println", "(Ljava/lang/String;)V"); > jstring msg = env->NewStringUTF("Hello world!"); > env->CallVoidMethod (objOut, midPrintln, msg); > > jvm->DestroyJavaVM(); > > exit (0); > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 173915
:
115826
| 115828