필터 지우기
필터 지우기

calling java from matlab

조회 수: 2 (최근 30일)
andre albagli
andre albagli 2013년 6월 29일
Folks:
I know that there are a few questions about this topic but I´m facing the same problem with running java with matlab. I used the simple java program bellow:
package SmartGrid;
public class teste1 {
/** * @param args */
public teste1 () {
}
public static void HelloWorld() {
System.out.println("Hello, World");
}
}
The program is stored in the folder c:\Apps\Programas em java\Portico\portico_Agent\bin\SmartGrid
so I added the java class path with the command:
javaadddpath('c:\Apps\Programas em java\Portico\pórtico_agent\bin\SmartGrid')
When I run a simple command:
x=SmartGrid.teste1();
I get this error message:
Undefined variable "SmartGrid" or class "SmartGrid.teste1".
what I am missing ?
The problem may be so simple that I cannot see the mistake.
I´d appreciate any help.
Regards André Nudel andre.nudel@gmail.com
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 6월 29일
Did you import the class ?
andre albagli
andre albagli 2013년 6월 30일
Walter: According to some messages posted here importing was not necessary and I did not import but I can try. Shouldn´t it be available as soon as javaaddpath is defined ? If not, what is the correct import command to type ?
Thanks in advance.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Call Java from MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by