Clear Filters
Clear Filters

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

2 views (last 30 days)
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.

Answers (1)

the cyclist
the cyclist on 7 Jan 2012
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')

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!