Hello Aere,

when Runtime.exec() is run, it returns a Process Object:

RG sends lots of into to the main output streams,  If you are not reading from the streams, this may cause the application to block (see api documentation link above).

RG sends lots of stuff to standard output on startup.  So if the stream is not getting drained, this will create blocking -- probably the blocking you are experiencing.

Julie S.

--- On Wed, 3/7/12, Aere Greenway <Aere@Dvorak-Keyboards.com> wrote:

From: Aere Greenway <Aere@Dvorak-Keyboards.com>
Subject: [Rosegarden-devel] Question on running Rosegarden from inside a Java program
To: "Rosegarden Developers" <rosegarden-devel@lists.sourceforge.net>
Date: Wednesday, March 7, 2012, 8:08 PM

Rosegarden Developers:

I have been experimenting with running various Linux MIDI components from within a Java program, and my experiments have been successful, with one exception:

When I attempt to run rosegarden from within the Java program (using an instance of the "Runtime" class,  and its "exec" method), the new subprocess does not start up until after the Java program is terminated.  Then it (rosegarden) starts up, and runs with no problems. 

None of the other MIDI components I am controlling with the Java program (qjackctl, qsynth, vmpk, and audacious) behave this way.  They all start up (and run) immediately, and asynchronously. 

I don't think it's a matter of rosegarden needing a lot of resources, since I have been able to start the gimp, and even virtualbox (in its place) from within the Java program.  Even if rosegarden is the only program I start within the Java program, it won't start until after I terminate the Java program. 

Do any of you have any idea of why this happens, and if so, is there any way to work around it? 

I am using Lubuntu 11.10 , which uses the 11.06 "Don Juan" version of Rosegarden, and I am using Open Java 6 (from the Ubuntu distribution). 





-----Inline Attachment Follows-----

Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.

-----Inline Attachment Follows-----

Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe