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: User experience Java Web Start




On Mar 15, 2006, at 2:37 AM, Mia Placht wrote:



When the app is cached a default Info.plist will be created for it, but is there a way to distribute your own Info.plist and override the default?


I am not that familiar with Java Web Start yet, although I've looked at it a little bit more recently.
However, accessing and modifying the Info.plist from java code isn't really all that difficult and is part of the functionality of my appedit code.


http://users.spacestar.net/mikehall/javasrc.html#appedit

e.g. part of the most recently added AppEditVerify code (should be mentioned somewhat recently in the list archives)

StringBuffer plistpath = new StringBuffer(APP_PACKAGE).append (fs).append("Contents").append(fs).append("Info.plist");
InfoPlistParser parser = new InfoPlistParser();
InfoPlistDict plist = parser.readInfoPlist(plistpath.toString());


		...
			[ Example modification to plist]
			plist.put("CFBundleExecutable",cfexecutable);

		...
			InfoPlist infoplist = new InfoPlist(plist);
			try {
				infoplist.write(plistpath.toString());
			}
			catch (IOException ioex) {
				out.println("repair I/O problem on Info.plist - ERROR");
				repaired = false;
			}

Info.plist dictionaries and arrays classes either subclass or just wrap but still include the same methods (I'm not remembering for sure as these have worked reliably for sometime without needing changing) as java.util.Hashtable and java.util.Vector, so pretty easy to work with.
Security issues aside in changing the application bundle on the fly. But it's not that difficult for that part if you have the permissions and want to examine or change it.
Depends on MinML, a small bundled XML parser, the URL should be included in the full appedit download somewhere.



Mike Hall mikehall at spacestar dot net http://www.spacestar.net/users/mikehall http://sourceforge.net/projects/macnative



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >User experience Java Web Start (From: Mia Placht <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.