[Wine] Re: WineLib and Java Native Interface (JNI) - UNIX

huutri wineforum-user at winehq.org
Mon Dec 15 01:05:09 CST 2008


"You can't run winelib by itself. It can only work under Wine."

YES, so how to config to let JNI/ UNIX JAVA environment understand Wine?

Anyway to let my JAVA can work with wrapper?

The steps are i have implemented are:
on WINDOWS
1. C++ window Dll -> JNI Wrapper DLL->JAVA (Worked well)

on Lunix
1. C++ window Dll -> Winedump with dll-> get new .c and .h and spec file.
2. Include JNI wrapper .h and add new JNI function to .c
winedump spec -f dump HelloImpl.dll -I "*.h" 

3. Using winegcc to make share object lib

winegcc HelloImpl.spec -o libhelloimpl.so HelloImpl_main.c -shared -fpic -I/usr/java/jdk1.5.0_12/include -I/usr/java/jdk1.5.0_12/include/linux

4. Load so share object lin in JAVA. It can load and call the function

BUT it will crashed when calling winelib functions.


It seems it doesn't understand winelib in JVM at runtime.

Can anybody can help to add some suggestion how to solve this problem?







More information about the wine-users mailing list