tags:

views:

168

answers:

3

I am using Win32 memcached from http://labs.northscale.com/memcached-packages/ And there is a DLL file within the package.

Now I am trying to write my Java project to use memcached. Somebody suggested Java -> JNI -> Custom DLL -> standard DLL call -> 3rd Party DLL in order to use the API.

What is the solution?

A: 

These articles might help:

  1. JNI Basics 1
  2. Call a .dll from Java
  3. Making a native call without JNI
GrayWizardx
+1  A: 

There are several Java Memcached clients, such as http://code.google.com/p/spymemcached/ and http://wiki.github.com/gwhalin/Memcached-Java-Client/ Using those is probably easier than re-inventing the wheel...

Wim
Yes, I can use those clients. But before using client, I have to start the memcached on win32, and make it bind with port 11211, am I right? No document specify that clearl. Thanks.
Yes, you have to start the memcached server separately (it can even be on a different machine, that's why it's usually handled separately from the application that needs the caching).
Wim
A: 

You run Memcached as a separate program, possibly as a service, and you connect to it through TCP/IP. That's how it works on other platforms too.

You don not load Memcached as a DLL.

bart