Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

Multiple java applications file association problem in one JNLP?

Thread view: 
yp.yean@gmail.com - 31 May 2007 11:08 GMT
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.
Tom Hawtin - 31 May 2007 12:23 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.