Path: news.mathworks.com!not-for-mail
From: "Todd Welti" <twelti@harman.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: accessing java gui from Matlab
Date: Mon, 6 Apr 2009 16:57:01 +0000 (UTC)
Organization: Harman Industries International
Lines: 19
Message-ID: <grdc8t$5j1$1@fred.mathworks.com>
References: <gr8en1$g1v$1@fred.mathworks.com> <gr8fh9$7bc$1@fred.mathworks.com>
Reply-To: "Todd Welti" <twelti@harman.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1239037021 5729 172.30.248.37 (6 Apr 2009 16:57:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 6 Apr 2009 16:57:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 57524
Xref: news.mathworks.com comp.soft-sys.matlab:530816


"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message <gr8fh9$7bc$1@fred.mathworks.com>...
> > Is there any way to access an object in a separate Java gui from matlab?  I am running a Java gui (not running from Matlab) and also an app in Matlab.  I would like to access the Java gui from Matlab (and changel a slider value in the Java app).  I'm guessing this might be impossible. 
> 
> Correct - AFAIK you cannot access a Java frame from another JVM.
> 
> > Is there some way to run the Java app from Matlab and get a handle to it?
> 
> Yes - Matlab runs its own JVM and can run Java classes directly. You will then have access to your Java GUI and can manipulate it from within Matlab.
> 
> Yair Altman
> http://UndocumentedMatlab.com 
>  

... the Java app is normally run from a bat file:

@echo off
java -classpath .;.\jna.jar com.hbas.asioConvGui.ASIOConvGUI > log.txt

I tried running this direcly in Matlab, but didn't work.