Multiple java applications file association problem in one JNLP?

Y

yp.yean

Hello , all

I have a problem in JWS with file association and main-class. I have a
java application that has two entry classes, one is appmain.class that
is required to launch from web, and the other is player.class that is
required to launch when user double-click the .abc extension file.

In JWS 5.0+, there is a association element in JNLP syntax that can be
used to make the file association with .abc extension. But how can I
declare the main-class in JNLP file?

If I declare the application-desc element as <application-desc main-
class="player">, the player.class will be launched from web. But if I
declare it as <application-desc main-class="appmain">, the .abc
extension wil be associated to the appmain.class.

Does anyone know how to solve this problem? Thank you for your kindly
help.
 
T

Tom Hawtin

I have a problem in JWS with file association and main-class. I have a
java application that has two entry classes, one is appmain.class that
is required to launch from web, and the other is player.class that is
required to launch when user double-click the .abc extension file.

Can't you just check the length of the 'args' array passed to your main?

Tom Hawtin
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top