Problem in file association and main-class in JWS

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.

[840 byte] By [ypyeana] at [2007-11-27 5:51:07]
# 1

One way is to define a third main that refers

to the other two, as appropriate. E.G. if the

web based main does not include -open as

its arguments, it is easy.class WebStartSpringboard {

/** Call web based main unless args include -open. */

public static void main(String[] args) {

if (args[0].equals("-open") ) {

OpenFileBasedClass.main(args);

} else {

WebBasedClass.main(args);

}

}

}

Other measures might be taken for a situation

where the web based version does include a

-open argument.

AndrewThompson64a at 2007-7-12 15:39:40 > top of Java-index,Desktop,Deploying...