필터 지우기
필터 지우기

Building a jar file in Matlab

조회 수: 15 (최근 30일)
Ali
Ali 2012년 1월 24일
I'm wondering if there is a way in Matlab to automate process of creating a Jar file from a Matlab binary.
Thanks in advance for your answer, A
  댓글 수: 2
Kaustubha Govind
Kaustubha Govind 2012년 1월 24일
Could you please explain what you mean by "MATLAB binary"? Did you mean a regular MATLAB (.m) file?
Ali
Ali 2012년 1월 25일
No, I meant a Windows Standalone Application (.exe) from the (.m) file.

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

답변 (3개)

Titus Edelhofer
Titus Edelhofer 2012년 1월 25일
Hi Ali,
just to make sure: you have an .exe compiled from MATLAB file and want to create a jar file from it? That's not possible. In Java you can call the .exe as an external process though.
To create a jar file in the sense of Builder JA (for Java) you will need to have the source code (.m file).
Titus

Ali
Ali 2012년 1월 25일
Hi Titus,
Thank you for your answer. Lets say I have a (.m) file and I would like to create a executable (.exe) for Windows platform and abinary for linux platforms. I was thinking the jar file in Matlab is a bytecode which can be run as an executable in Linux platforms which dont have support for Matlab source code.
Lets say I have the .m file, then is there a way to automate creating the .exe file for the external applications?
/A
  댓글 수: 1
Titus Edelhofer
Titus Edelhofer 2012년 1월 25일
O.K., I understand. Then I guess the following is possible: you might write a simple .java file which contains only a few lines running the MATLAB code compiled into the jar file. Take any example from the doc for Builder JA ("Sample Java Applications").
This is not automatically done for you by MATLAB but should be not too difficult. Compile this .java file and you can run it on your Linux box.
Titus

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


KSSV
KSSV 2012년 1월 25일
Hi Check the following link: It may be helpful.
Sreenu
  댓글 수: 1
Ali
Ali 2012년 1월 25일
Hi Sreenu,
As far as I know, Builder JA just creates a jar file to provide an API for external Java applications.
I would like to create a binary (executable file) from a (.m) for a Linux platform.

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

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by