Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Calling Java from within Matlab
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
sikapa

Posts: 4
Registered: 1/5/11
Calling Java from within Matlab
Posted: Aug 13, 2014 7:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hell All,

I'm trying to call Java from within my Matlab script, but it doesn't find it even though I added the path. Here's my sample code.

-----------------------------------------

% My jar file path
dpath = 'D:\Users\siopal\Documents\myOwnJarFile.jar';

javaaddpath(dpath);


import ('com.siopal.main.*');

[M,X,J] = inmem
-----------------------------------------

The output for "M", "X" and "J" from function "inmem" is the following:

M =

'opaque.char'
'pathsep'
'javaclasspath'
'getSettingsRoot'
'myForecastPostProcessing'
'strread'
'strvcat'


X = 'dataread'


J = 'message'

----------------------------------------

So, it doesn't look that the Java classes from the function call:

import ('com.siopal.main.*');

is found by Matlab, in which the package resides in the Jar file from path:

'D:\Users\siopal\Documents\myOwnJarFile.jar';

Am I missing something here?

Any tips would be much appreciated.


Thanks.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.