Creating a java viewer via JNI

I have downloaded the java-based Cascade examples, and I would like to attempt to create a small application which launces a simple 3d viewer from java.

Obviously, the calls to the native side require a dll to be created containing the native methods. I can do this using my own simple methods but I cannot figure out how the sample code manages to create CasCade objects given the special naming conventions required for JNI.

Although, java based examples are found on the download page there does not seem to be any supporting documentaion available.

I would greatly appreciate any help from anybody who as successfully used jni to call Cascade native code.

A.Baskaran's picture

I also trying same thing.
Above link contain simple JNI concept.It will help you to understand jni part in java sample.

But while executing above program i'm getting some problem.

Kustaa Nyholm's picture

You should check out:

which has working Java bindings for OCC and has been built succesfully on MacOS, Windows, Linux.

It is not a complete binding ie not everything OCC offers is available, but it is relatively easy to extend.

BTW If all you are after is simple 3D viewer then OCC might be an overkill. I you just have 3d models I would suggest looking for something easier. However, if you do need solid *modeling* or need to read some CAD formats like STEP or IGES, then OCC is propably a viable solution.

br Kusti