Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matlab 7.0.1 - Call Java within Matlab problem.

Status
Not open for further replies.

massive15234

Computer
Apr 21, 2006
1
Hi everyone,
my system runs WindowsXP and Matlab 7.0.1 and I want to access within Matlab some of my Java classes (.class file). So I tried do this:

1) I created 'MyClass.class' from a java file 'MyClass.java' with package name 'MyJava' and stored it at 'C:\MyJava'.

2) I replaced the first '.' at Matlab's 'classpath.txt' with the line 'C:\MyJava' (it supposed 'MyClass.class' to be seen by Matlab!)

3) I restart Matlab.

4) I wrote these Matlab's commands:
>import MyJava.*;
>obj=MyClass;

But it said that '??? Undefined function or variable 'MyClass'.'

If anyone knows what to do to access the class please inform me!

Thanks!
Bye!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor