How to open and read Data from a Java .jar-archive

2 次查看(过去 30 天)
Hi,
I´ve got a JavaShell, that I can open via Dos by "javaw.exe -jar [program.jar]". In the program I´m able to open a database. Now I would like to open the program from Matlab, import the database and copy some informations to Matlab.
a)Is this possible ? and b) How ?
I already read the Matlab Help "Java Classes Contained in a Jar File" but actually that didn´t help. Besides I couldn´t open the [program.jar] I have the additional problem, that the data that I need has first to be loaded (as described) - it isn´t already presented, when I´m opening the program.jar.
I even would appreciate an adivice where to find more about this theme.

回答(1 个)

the cyclist
the cyclist 2012-1-7
Sorry for the absurdly delayed answer, but I was just searching for a similar answer myself, and found your question. One simple way to call Java from MATLAB is to use the system() command:
system('java -jar program.jar')

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by