|
|
call java class from Matlab
hi all...
I have created 3 classes by using java programming language, now I want to call FROM Matlab the class that contains main method, i.e. call java from matlab..
I found that Matlab support java, but I don't know how to call the main method..
Please help me..
thanks in advance
ibtesam
|
|
0
|
|
|
|
Reply
|
Ibtesam
|
6/2/2010 10:15:23 PM |
|
I'm sure you can find the answer in here somewhere:
http://undocumentedmatlab.com/
or even on the Mathworks site:
http://blogs.mathworks.com/desktop/2009/07/06/calling-java-from-matlab/
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
6/2/2010 10:56:04 PM
|
|
thanks for your help...
I try this on command window:
javaaddpath C:\MATLAB7\work\java
%java folder contains all my .java and .class files
then I write this in command window:
javaclasspath
%this printed
STATIC JAVA PATH
.
C:\MATLAB7\java\patch
C:\MATLAB7\java\jar\util.jar
C:\MATLAB7\java\jar\widgets.jar
C:\MATLAB7\java\jar\beans.jar
.
.
.
.
DYNAMIC JAVA PATH
C:\MATLAB7\work\java
Please help me, how call the main method from Matlab...????
I read the help, the links posted by ImageAnalyst and another book "MATLAB Primer".
I also try to create .jar and .exe file for my java classes
BUT I have no idea... please please help me
ibtesam
|
|
0
|
|
|
|
Reply
|
Ibtesam
|
6/3/2010 7:00:22 PM
|
|
please help me...
I created my java class, I have both (.class and .java) files, I don't know where to put my java files?? also I don't konw to create object in matlab from these classes?
really I confused, don't know how to complete my project
ibtesam
|
|
0
|
|
|
|
Reply
|
Ibtesam
|
6/4/2010 2:37:05 AM
|
|
"Ibtesam Saleh" <bossy_4me@yahoo.com> wrote in message
news:hu8u46$vo$1@fred.mathworks.com...
> thanks for your help...
> I try this on command window:
> javaaddpath C:\MATLAB7\work\java
*snip*
> Please help me, how call the main method from Matlab...????
> I read the help, the links posted by ImageAnalyst and another book "MATLAB
> Primer".
> I also try to create .jar and .exe file for my java classes
> BUT I have no idea... please please help me
If you're using the latest version of MATLAB, read this section from the
External Interfaces documentation:
http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f44062.html
If you're using an older version, locate the External Interfaces portion of
the main MATLAB documentation in your installation and read the version of
that section in your installed documentation.
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|
|
0
|
|
|
|
Reply
|
Steven
|
6/4/2010 2:40:30 AM
|
|
"Steven Lord" really not understand, I read the posted link before and I not understand...
this version of my matlab:
MATLAB Version 7.0.0.19920 (R14)
Operating System: Microsoft Windows XP Version 5.1 (Build 2600: Service Pack 3)
Java VM Version: Java 1.4.2 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
May by the problem related to my jdk, I used:
jdk1.5.0_06
jre1.5.0_06
j2re1.4.2_03
jre6
and I use JCreator Pro v.4.50 under windowsXP
Please tell me where to put my created classes? should I create .jar file? or its only .class that created by JCreator compiler? how create object from my class to call it from matlab?
Finally is my jdk version will affect on JVM in matlab??
I am sorry about long questions
Ibtesam
|
|
0
|
|
|
|
Reply
|
Ibtesam
|
6/4/2010 3:04:04 AM
|
|
|
5 Replies
351 Views
(page loaded in 0.038 seconds)
|
|
|
|
|
|
|
|
|