Be the first to rate this file! 10 Downloads (last 30 days) File Size: 1.68 MB File ID: #10463

Matlab -> dl l-> JNI -> Java working example

by Wojciech Gradkowski

 

21 Mar 2006 (Updated 22 Mar 2006)

This is a code sample of m-file->dll->JNI->Java interfacin

| Watch this File

File Information
Description

In this package contains:
- simple matlab funcion that was compiled with MCC to dynamic library.
- Visual Studio .NET project showing how to plug in the Matlab's dll and create JNI library interacing to Java
- Java project that uses native methods to run compiled dll's

Acknowledgements
This submission has inspired the following:
From Fortran, call MATLAB Compiler C shared library
Required Products MATLAB Compiler
MATLAB release MATLAB 7.0.4 (R14SP2)
Other requirements Java SDK, Visual Studio .NET
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
23 Jul 2008 Cyrus Patel

Hello,

I am currently trying to call my matlab functions from Java using the JNI method described here. I have got it working well from Windows (even under heavy load).

However, when I run it on Linux under heavy load it crashes. The problem appears to be the libXXXInitializeWithHandlers function - it causes the JVM to crash.

Do you have an example similar to the above but working for Linux. Have a encountered any instability in the compiled matlab libraries that can crash the JVM?

Thanks,
Cyrus

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
matlab compiler Wojciech Gradkowski 22 Oct 2008 08:19:29
java Wojciech Gradkowski 22 Oct 2008 08:19:29
jni Wojciech Gradkowski 22 Oct 2008 08:19:29
java native interface Wojciech Gradkowski 22 Oct 2008 08:19:29
dll Wojciech Gradkowski 22 Oct 2008 08:19:29
jni Xie Guotian 18 May 2012 08:51:33

Contact us at files@mathworks.com