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. Is there some way to run the Java app from Matlab and get a handle to it?
> 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" <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
>
"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.
"Todd Welti" <twelti@harman.com> wrote in message
news:grdc8t$5j1$1@fred.mathworks.com...
> "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.
Open up the Help Browser using the DOC function. In the main MATLAB
documentation there's a chapter titled "External Interfaces". One of the
sections of that chapter describes the steps you'll need to follow to use
Java from within MATLAB.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.