views:

64

answers:

3

So... I will have a project which will be tested on Win 7 and some Linux server. It will be a web service that will use HSQLDB, Hibernate, Spring, Blaze DS and Flash (Flex RIA) as front end. I need to implement into it some image filtering\editing functionality which will be implemented in cross-platform C++ code (It will use Open-CV) wrapped in Java.

I need some kind of tutorial how to create cross-platform Java projects that use C/C++ libs *(most of all I am intrested in crossplatform compiling issue and what IDEs support such things)

+1  A: 

Something along these lines? http://www.javaworld.com/javatips/jw-javatip17.html?page=1

dutt
+1  A: 

You're going to need to use JNI. The Java will be totally cross-platform and can be one project. For C++, you will need to create the JNI callable interface, and build as a dynamic library. The code should be pretty cross platform, but the actual build will be different.

On Linux, you need to build as a .so and you will probably use gcc. On Windows, you will probably use Visual Studio and build a .dll. The build will be different.

Lou Franco
+1  A: 

It sounds like you'll benefit from the Java Native Interface. If you've got existing C and C++ code that you'd like to use from Java you may want to seriously consider something like GlueGen. It will save you a lot of time generating the code to access your C code.

You can have a look at the official Java JNI Examples here

Montdidier