Hello Guys
Is there any possibility that I can directly send signal to a Java virtual machine which is created by calling JVM_CreateJavavm in native C/C++ code?
e.g.:
For a normal Java process, say its pid is 12345, I can send a signal 3 to it like this ...
kill -3 12345, and hopefully I could trigger javacore or heapdump by changing...
I have trouble setting java object value in JNI. When run under debug mode, it always show this error:
DalvikVM[localhost:8664]
- Thread[,#.main] (suspended(exception RuntimeException))
I don't know what's wrong with it. Can someone please help me out here. Many thanks in advance.
Below are my code:
[Data class]
package com.li...
My application is mostly Java but, for certain calculations, uses a C++ library. Our environment is Java 1.6 running on RedHat 3 (soon to be RedHat 5).
My problem is that the C++ library is not thread-safe. To work around this, we run multiple, single-threaded "worker" processes and give them work to do from a central Work Manager, also...
I am trying to get my feet wet with JNI because I have an application in C that needs to access a single Java library function (no C-equivalent library). I've written a very simple test program to load a Java VM from C and call a static function and get the return value.
Unfortunately, I am unable to get the class to properly load. Al...
Hello,
Does ntdll.dll come standard with windows xp and windows vista? I know that I have it on my windows xp machine, but am not sure that is standard with every machine.
The reason I am curious is for the NTQuerySystemInformation function to get CPU usage of a windows xp and/or windows vista system.
Thanks,
Steve
...
I am trying to use a pre-existing native C library in my android project.. The library builds just fine with the NDK tools...
Now what I've come to understand is that I cannot just call into the library, but my library needs to include jni.h and add specific function declarations, like for example:
JNIEXPORT jint JNICALL Java_com_MultP...
Hi.
Can someone please tell me if I'm missing something here?
I am trying the following commands in shell.
$ ./adb shell stop
$ ./adb shell setprop dalvik.vm.checkjni true
$ ./adb shell start
But Logcat always shows "CheckJNI is OFF" when I install the apk onto the device.. Is there something else in eclipse that I need to do to enabl...
Hi guys,
I want to create native Mac OS X application using Cocoa + Objective C but I need to connect to proprietary data source, and for this, owner of the data source only provides Java library. So I need to somehow import this Java library into my project and call functions on its Java classes.(Or create java wrapper around this libra...
Original question
I use Launch4j as a wrapper for my Java application under Windows 7, which, to my understanding, in essence forks an instance of javaw.exe that in turn interprets the Java code. As a result, when attempting to pin my application to the task bar, Windows instead pins javaw.exe. Without the required command line, my appl...
Hi,
I need to include native lib (jnotify but I think that it does't matter) to my jar. I wont to do it with NetBeans.
I added Bundle-NativeCode: /lib/jnotify.dll; osname=win32 to my manifest.mf file and added jnotify.dll to projektHome\src\lib\ folder. But unfortunately NetBeans is overidning manifest.mf file.
How can I fixed? Can I ...
I have an unsigned char* in my C library, and Im calling a JNI exported function that needs to set a java object with this data... preferably in a byte[].
But this function will be called very often, and it's quite a lot of data to be copied.. Is it possible to use a ByteBuffer and assign the pointer of that bytebuffer to my unsigned ch...
I currently have code that makes a call from java into my cocoa app using JNI, in the JNI function on the cocoa side I create a new thread and assign my NSApp delegate like the main function would do. Here is the code I am using in a dummy class that creates my real class:
@implementation MenuLauncher
- (void)run {
NSAutoreleasePo...
Output of: javap -s SomeClass
public org.someapp.SomeClass$_data data;
Signature: Lorg/someapp/SomeClass$_data;
Definition of SomeClass in Java:
class SomeClass
{
private class _data {
byte[] something = new byte[1234];
}
public _data data;
}
Definition of native function in Java:
public static native int Na...
I'm using JODConverter 3.0 to handle communicating with OpenOffice to convert documents. Everything is working fine except that JODConverter uses a Java library from OpenOffice that uses JNI to grab certain library files from the system. This throws an exception if I don't set the java.library.path method using -D when running java.
The...
I'm running into problems using AWT classes on OSX (10.5.8) with Java 6 (1.6.0_17 JVM: 14.3-b01-101).
Trying to load java.awt.Dimension the code just freezes, this happens in Eclipse or from the command line. Anyone experiencing same problems ?
The class is used by JAI in the following code:
public static byte[] resizeAsJPG(byte[] imag...
I am using the recently released Glassfish v3 and while using native libraries glassfish would intermittently complain glassfish SEVERE: java.lang.UnsatisfiedLinkError:
Native Library already loaded in another classloader
The procedure to load native libraries in the previous glassfish release (v2.2) was to simply put the .dll files in...
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 lock in place, and then it's released with a "commit". I'm writing a JNI glue layer to access this code from Java, but the lock is behaving differently in JNI vs pure ...
Hello
I am trying to create Java Virtual Machine in a cplusplus program using the code as follows:
JNIEnv *env;
JavaVMInitArgs vm_args;
JavaVMOption options[1];
options[0].optionString = "-Djava.class.path=D:\\Java Src\\TestStruct"; //Path to the java source code
vm_args.version = JNI_VERSION_1_6; //JDK version. This indicates version ...
I have been given the task to upgrade an existing 16 Bit Desktop application originally written in GFA Basic.
I want to know if there is a possibility to access the functions inside these 16 Bit Dlls via C/JNI (or any other programming language).
I guess, I have to write some sort of an intermediate DLL to access the functionalities from...
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 quite often, the thread should probably stay attached. Calling AttachCurrentThread multiple times is fine ("Trying to attach a thread that is already attached is a no-op.")
...