Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

creating dll for JNI?.

938414May 19 2012 — edited May 22 2012
Hello!

I've completed two JNI examples in Linux Ubuntu 11.04:

1. http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html

2. http://csharp.com/javacfort.html

Now I'd like to prepare Windows versions of these examples. But I stuck on creating
dll recognized by Windows. I tried CygWin, minGW and Visual C++ 2010 Express.
But gcc (Cygwin and minGW) and cl (Visual) have problems with such task.
Particularly with lines:

#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/mman.h>

Cannot find these headers. So my question is: how to create dll in such cases?. What tools should I
use, what commands should I issue?.
Or, perhaps, there are some other ways?. For example, running Linux versions in Windows?.
The biggest problem is this native library :(.

Cheers,

Mac.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2012
Added on May 19 2012
11 comments
4,601 views