🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #222

Re: Running applications from Java

#222
From: Paul Nichols [TeamB]
Date: Thu, 20 Oct 2005 03:33
25 lines
1985 bytes
Anton Jungreuthmayer wrote:

> I have an application which launches excel - it does this fine but I
> need it to be part of the application, rather than a separate app.
> Currently Excel appears on the screen but if I click on the original app
> it dissapears into the background - ideally I would like it to be
> contained in a JDialog - is this possible ?

There are third party products that will allow you embed Excel spreadsheets
into your Java applications. However, if you are using the regular
Runtime.getRuntime().exec("excel.exe somesheet.xl") then you cannot control
layered windows, since Windows is controlling the Topmost Window through
the WinAPI, not the jvm.

Your only other options (using Excel itself), is to write some COM wrapper
using a JavaToCom bridge, or write some other Windows app (using something
like Visual Basic, Delphi, C++) that will embed the Excel app using a COM
wrapper and making the excel app the topmost Window through the Windows
API.

Sorry, but I personally do not know of any other way of doing this, since
you are dealing with limitations in the Windows API. Remember, are using
Windows APIs to launch the native application.

Hope this helps
Technical Details
Message-ID: <4355ba46@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <42e0272c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,ad5f53c47599c873
X-Google-Attributes: gid1089d0,public
X-Google-Language: ENGLISH,ASCII-7-bit
Message-ID: <4355ba46@newsgroups.borland.com>
From: "Paul Nichols [TeamB]" <paul@comp.net>
Subject: Re: Running applications from Java
Newsgroups: borland.public.jbuilder.java.api
Date: Wed, 19 Oct 2005 22:33:33 -0500
References: <42e0272c$1@newsgroups.borland.com>
Lines: 27
User-Agent: KNode/0.9.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Host: 71.8.84.183
X-Trace: newsgroups.borland.com 1129691718 71.8.84.183 (18 Oct 2005 20:15:18 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail