Opening data file in already open app by double clicking?

K

kaopelt

Hello all,
We have created a java app that creates its own file format that we
can assoicate with the application in Windows. We would like for the
user to be able to double click on of these files while the app is
running and have the app open it. We are at a loss of how to do this
with out opening another session of app, which is what we are trying
to avoid. Any help, tips, webpages to read, anything to try would be
super helpful.

Thanks,
Menlo
 
M

Martijn

We have created a java app that creates its own file format that we
can assoicate with the application in Windows. We would like for the
user to be able to double click on of these files while the app is
running and have the app open it. We are at a loss of how to do this
with out opening another session of app, which is what we are trying
to avoid. Any help, tips, webpages to read, anything to try would be
super helpful.

There might be a "better" way, but this sounds very platform specific and
may not be supported by Java directly (maybe some library exists, but I
would think you would have already found it).

Anyway, you could write a wrapper script/application that checks whether
your application is already running, and if so, simply put that instance to
the foreground. Similar approaches could be taken for other platforms.

Good luck,
 
P

Philipp

Hello all,
We have created a java app that creates its own file format that we
can assoicate with the application in Windows. We would like for the
user to be able to double click on of these files while the app is
running and have the app open it. We are at a loss of how to do this
with out opening another session of app, which is what we are trying
to avoid. Any help, tips, webpages to read, anything to try would be
super helpful.

If you distribute using Java Web Start this is included. You can do file
association and also using SingleInstanceService, you can avoid a second
app being launched but params are forwarded to the already running app.

HTH Phil
 
A

Andrew Thompson

Philipp wrote:
(double click - open)
..
If you distribute using Java Web Start this is included. You can do file
association and also using SingleInstanceService, you can avoid a second
app being launched but params are forwarded to the already running app.

& here is an example of using the SingleInstanceService..
<http://www.physci.org/jws/#sis>

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200704/1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top