I am adapting a little rmi client-server application. I have written several things :
HelloInterface -> A Hello World interface for RMI
Server -> The server app'
Client -> The client app'
Nothing special, but... ... |
I have some objective-c code that uses an NSLock to implement a sort of transaction. The object is locked on a "begin transaction", several other calls are made with the ... |
I have some native thread that needs to call into Java. For that, I need to attach the thread to the VM using AttachCurrentThread. Since this callback will happen ... |
I have written a library in C using a variety of the #pragma omp directives to parallelize execution. I am on Mac OS X 10.6. I have then wrapped these functions ... |
I'm getting weird string corruption across JNI calls which is causing problems on the the Java side. Every so often, I'll get a corrupted string in the passed array, which sometimes ... |
I have a program that's using the FFMPEG binary libraries via JNI. There is a call to open a URL which is blocking in native code, and I need to ... |
Would it be possible to implement a custom Thread class in Java (using JNI) in a safe / correct way?
Suppose I write my own NewThread class, with a native start() method, ... |
|
I'm trying to create a Qt widget in C++ as a child of a Jambi widget. Passing the parent's native pointer into a JNI method seems to be the straightforward approach, ... |
According to this and this, it seems that a dll is only unloaded when the reference to the ClassLoader object is gone and the garbage collector runs. If ... |
I am developing a java application which uses a c++ library. My application type is an client/server RCP (eclipse plugin based). The problem is when I try to connect more than ... |
I have a puzzling problem. We have a Java application that starts multiple threads - each of which uses JNI to call native ioctls in order to work on a hardware device. Here's the question: What happens to the thread when the native method blocks for I/O? Is it considered blocked in the usual way, which should allow one of the ... |
I have some JNI C++ code that gets called from a C application. Sometimes, the thread on which it gets called is not known to the JVM. To enable the use of JNI calls into the JVM from this thread, I call AttachCurrentThreadAsDaemon(). As we attach as daemon, the attaching of this thread does not affect JVM shut-down. However, I have ... |
I have asked everywhere but I cann't figure this out. When I run the native method in a thread it doesn't work. It stops right at the capGrabFrame(hwndcap) ; Here is the JNI method that is the problem. JNIEXPORT void JNICALL Java_WebCamScreen_captureFrame(JNIEnv * env , jobject obj) { //std::cout << "Got in captureFrame from C++ handle is " << hwndcap ; ... |
I have a mutli-threaded native cross-platform SDK. I have built a class library and JNI integration into it that calls in on its own threads. I need to do some cleanup work (cleanup Global References) on some internal threads. I noticed that the JNI docs explicitly state that "JNI interface pointer(s) are only valid in the current thread. A native method, ... |
Hi all, I have a Java Logger object that I am passing to a JNI dll written in C++. If I spawn a thread from the JNI dll and log from that thread, the thread id in the log file increments for each log entry. To test this I wrote an infinite loop on the thread to make sure that the ... |