Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to associate a document with my Java app




On 9-Feb-08, at 11:14 AM, Johnny Kewl wrote:

As one knows an executuble Jar actually runs like this
 
java -jar <MyApp>
 
if one needs to associate an application document with MyApp
 
the file association needs to do this
 
java -jar <MyApp> <TheAppDoc.myappdoc>
 
ie if MyAppDOC is clicked on, the application it calls is
java -jar <MyApp> %1
 
Can this be done by the user...
 
And can a Java Application tell the system that it needs some file types to work correctly?
 
 
Thanks... I'm lost


A Mac application doesn't typically open documents by passing them as command line arguments.
What you need to do is create an application bundle for your Java app.  There are articles on the Apple website about this (you may need a free ADC membership to get at them).

Sun had a good three-part article about making your Java application work better on the Mac platform by integrating with the typical Mac ways of doing things.

start here:  http://today.java.net/pub/a/today/2004/01/05/swing.html


Scott
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Is there a way to associate a document with my Java app (From: "Johnny Kewl" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.