jni « Development « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » Development » jni 

1. How to automatically copy data to new RMI threads?    stackoverflow.com

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... ...

2. Mutex in JNI using Foundation NSLock    stackoverflow.com

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 ...

3. Do I Have to JNI Detach an Attached Thread?    stackoverflow.com

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 ...

4. Why can JNI libraries compiled using OpenMP only be called on Java's "main" thread?    stackoverflow.com

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 ...

5. JNI String Corruption    stackoverflow.com

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 ...

6. Is there a way to force a native thread to exit through JNI?    stackoverflow.com

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 ...

7. Custom implementation of Thread in Java: Is it possible though JNI?    stackoverflow.com

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, ...

8. Qt Jambi and threads    stackoverflow.com

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, ...

9. Unloading dll in Java    stackoverflow.com

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 ...

10. My library on multiples connections with my JNI applications    stackoverflow.com

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 ...

11. Multithreading and JNI    coderanch.com

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 ...

12. Using Java threads in JNI    coderanch.com

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 ...

13. JNI and Thread DeadLocking Problem    coderanch.com

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 ; ...

14. JNI : Getting a JNI Interface Pointer from a Brand New Thread    forums.oracle.com

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, ...

15. Java Logger incrementing thread ids for a thread spawnned via JNI    forums.oracle.com

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 ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.