Re: jar in .app bundle?
Re: jar in .app bundle?
- Subject: Re: jar in .app bundle?
- From: Scott Tooker <email@hidden>
- Date: Wed, 24 Oct 2001 11:00:00 -0700
Scott
On Tuesday, October 23, 2001, at 11:25 PM, Alex Rice wrote:
I am writing an Obj-C app which uses Java classes. I need to distribute jar
files with the app. In order for the app to see the jar file, where in the
app's bundle should the jar files go, and what application settings should
be set?
In PB's application settings I currently have:
<key>NSJavaNeeded</key>
<string>YES</string>
<key>NSJavaPath</key>
<array>
<string>jaxp.jar</string>
<string>crimson.jar</string>
<string>xalan.jar</string>
</array>
<key>NSJavaRoot</key>
<string>.</string>
I was guessing that NSJavaRoot is relative to the app's bundle and I could
just put my jar files into my.app/Contents or my.app/Contents/Resources
However the only way I can get the app to see the jar files is setting
NSJavaRoot to the absolute path on the filesystem which contains the jar
files- obviously that won't work for distribution.
You should place your jar files in Contents/Resources/Java and NSJavaRoot
should be set to "Contents/Resources/Java".
Also, I have noticed that the utility "Applet Launcher" has the following
in it's Info.plist:
<key>Java</key>
<dict>
<key>ClassPath</key>
<string>$JAVAROOT/Applet Launcher.jar</string>
<key>MainClass</key>
<string>com.apple.mrj.tools.AppletLauncher</string>
<key>Properties</key>
<dict>
<key>com.apple.mrj.application.growbox.intrudes</key>
<string>true</string>
<key>java.security.policy</key>
<string>file:Contents/Resources/MRJAppletLauncher.
policy
</string>
</dict>
<key>WorkingDirectory</key>
<string>$APP_PACKAGE</string>
</dict>
Where are these dictionary structures documented?
These keys are new to 10.1 and are used with pure Java applications (they
are meant to replace the functionality MRJApp.properties file, which has been
deprecated). Documentation should be available at
http://developer.apple.com/
techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html
I am also curious how people are dealing with their Targets in PB when you
have jar files in Obj-C apps?
Anyone know of an existing app with obj-c and jar files I can inspect the
bundle and plist file so see how it's done?
TIA!
Alex Rice <email@hidden>
Mindlube Software
http://www.mindlube.com/
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Scott Tooker
QA & Integration - Project Builder
Mac OS X Development Environment