Apple Mac - plist.info files..

A

Andrew Thompson

I found this document at Apple relating
to the format of the info.plist file..
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRun
timeConfig/Concepts/ConfigFiles.html>

I'd like to put such a file in the jars I am making
at the Java On-Line Compiler, but all I intend to
indicate is the JRE version required.

Could I induce some Mac owner to create a
sample .plist file with _only_ the java version
specified, so that I can 'cut-n-paste' it?
 
S

Steve W. Jackson

Andrew Thompson said:
:I found this document at Apple relating
:to the format of the info.plist file..
:<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRun
:timeConfig/Concepts/ConfigFiles.html>
:
:I'd like to put such a file in the jars I am making
:at the Java On-Line Compiler, but all I intend to
:indicate is the JRE version required.
:
:Could I induce some Mac owner to create a
:sample .plist file with _only_ the java version
:specified, so that I can 'cut-n-paste' it?
:
:--
:Andrew Thompson
:* http://www.PhySci.org/ PhySci software suite
:* http://www.1point1C.org/ 1.1C - Superluminal!
:* http://www.AThompson.info/andrew/ personal site

If your Java On-Line Compiler is intended as an applet, you won't be
able to do that. It only applies to double-clickable apps on Mac OS X
systems. You might like to take a look at the FAQ portion of Apple's
Developer site for Java at <http://developer.apple.com/java/faq/>.

= Steve =
 
A

Andrew Thompson

| In article <[email protected]>,
....
| If your Java On-Line Compiler is intended as an applet, you
won't be
| able to do that. It only applies to double-clickable apps on
Mac OS X
| systems.

Ironically, thus far the On-Line compiler only
does _applications_, but I was going to be
lazy and put a Manifest.mf in every jar it
makes, I just hope that it will not
stuff up Applets..

| You might like to take a look at the FAQ portion of Apple's
| Developer site for Java at
<http://developer.apple.com/java/faq/>.

Thanks Steve, I'll give it a look..
 
S

Steve W. Jackson

Andrew Thompson said:
::| In article <[email protected]>,
:...
:| If your Java On-Line Compiler is intended as an applet, you
:won't be
:| able to do that. It only applies to double-clickable apps on
:Mac OS X
:| systems.
:
:Ironically, thus far the On-Line compiler only
:does _applications_, but I was going to be
:lazy and put a Manifest.mf in every jar it
:makes, I just hope that it will not
:stuff up Applets..
:
:| You might like to take a look at the FAQ portion of Apple's
:| Developer site for Java at
:<http://developer.apple.com/java/faq/>.
:
:Thanks Steve, I'll give it a look..
:
:--
:Andrew Thompson
:* http://www.PhySci.org/ PhySci software suite
:* http://www.1point1C.org/ 1.1C - Superluminal!
:* http://www.AThompson.info/andrew/ personal site
:
:

If you still find you can use a plist file, I can *try* to put one
together, but I've never used the Xcode environment and can't testify
that it'll be usable.

= Steve =
 
A

Andrew Thompson

....
| If you still find you can use a plist file, I can *try* to put
one
| together, but I've never used the Xcode environment and can't
testify
| that it'll be usable.

Puh... this is usenet Steve, if it does not
work I'll 'ask for my money back'. ;-)

And yes, I would appreciate if you could
do that for me. I'd like to give it a try.
 
S

Steve W. Jackson

Andrew Thompson said:
::...
:| If you still find you can use a plist file, I can *try* to put
:eek:ne
:| together, but I've never used the Xcode environment and can't
:testify
:| that it'll be usable.
:
:puh... this is usenet Steve, if it does not
:work I'll 'ask for my money back'. ;-)
:
:And yes, I would appreciate if you could
:do that for me. I'd like to give it a try.
:
:--
:Andrew Thompson
:* http://www.PhySci.org/ PhySci software suite
:* http://www.1point1C.org/ 1.1C - Superluminal!
:* http://www.AThompson.info/andrew/ personal site

OK, I opened XCode for the first time and had it create a new pure Java
application project for me. It's neat in that it automatically gives me
the main class, along with an about box and some basic stuff. And it
lets me specify the JVM version in multiple ways -- for the target app,
and then for the compiler.

The following text is from the actual Info.plist file it built when I
had it build the "JavaSwingApp" program with most of its defaults intact.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>JavaSwingApp</string>
<key>CFBundleIconFile</key>
<string>JavaSwingApp.icns</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>JavaSwingApp</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<key>Java</key>
<dict>
<key>ClassPath</key>
<string>$JAVAROOT/JavaSwingApp.jar</string>
<key>JVMVersion</key>
<string>1.4+</string>
<key>MainClass</key>
<string>JavaSwingApp</string>
<key>Properties</key>
<dict>
<key>apple.laf.useScreenMenuBar</key>
<string>true</string>
</dict>
</dict>
<key>NSJavaNeeded</key>
<string>YES</string>
<key>NSJavaPath</key>
<array>
<string>JavaSwingApp.jar</string>
</array>
<key>NSJavaRoot</key>
<string>Contents/Resources/Java</string>
</dict>
</plist>


You'll note that it's XML, though the specific format is Apple's "plist"
format (property list). If you want to change the target app's JVM
version, you can change that string (from what I gather by the list
offered in the IDE) to 1.3.1, 1.3*, 1.3+, 1.4, 1.4* or 1.4+. Since it's
editable, I could actually type anything there. If I omit that field
(select an empty value), it omits the <key>JVMVersion</key> and the
subordinate <string> tags entirely.

This may or may not be useful unless you also know how to build the
directory structure of a typical OS X application.

= Steve =
 
A

Andrew Thompson

"Steve W. Jackson" ...
....
| The following text is from the actual Info.plist file it built
when I
| had it build the "JavaSwingApp" program with most of its
defaults intact.
.....
| <array>
| <string>JavaSwingApp.jar</string>
| </array>

I think I may have misunderstood where this
info.plist file goes. I thought it was packaged
_inside_ the jar. The above, combined with..
....
| This may or may not be useful unless you also know how to build
the
| directory structure of a typical OS X application. *

...that comment makes me wonder. Is this file
_inside_ the jar, or on the local file system?

* Which, no I don't. :-(
 
B

Bill Tschumy

"Steve W. Jackson" ...
...
defaults intact.
....

I think I may have misunderstood where this
info.plist file goes. I thought it was packaged
_inside_ the jar. The above, combined with..
...

..that comment makes me wonder. Is this file
_inside_ the jar, or on the local file system?

The info.plist file goes inside the application package. An application
package is a directory with subdirectories that contains the application and
associated resources. From the end user's point of view, an application
package looks like a single executable file.

To my knowledge it is not possible to put an info.plist inside a jar file
(well, you can put one there, but it won't be scanned). With a simple jar
file you have no control over which JVM is used to run it unless you use an
application package or a shell script.
 
A

Andrew Thompson

..
| On Tue, 20 Jan 2004 15:34:24 -0600, Andrew Thompson wrote
| (in message <[email protected]>):
|
| > "Steve W. Jackson" ...
| > ...
| >> The following text is from the actual Info.plist file it
built
| > when I
| >> had it build the "JavaSwingApp" program with most of its
| > defaults intact.
| > ....
| >> <array>
| >> <string>JavaSwingApp.jar</string>
| >> </array>
| >
| > I think I may have misunderstood where this
| > info.plist file goes. I thought it was packaged
| > _inside_ the jar. The above, combined with..
| > ...
| >> This may or may not be useful unless you also know how to
build
| > the
| >> directory structure of a typical OS X application. *
| >
| > ..that comment makes me wonder. Is this file
| > _inside_ the jar, or on the local file system?
|
| The info.plist file goes inside the application package. An
application
| package is a directory with subdirectories that contains the
application and
| associated resources. From the end user's point of view, an
application
| package looks like a single executable file.

Is it all zipped* up?

| To my knowledge it is not possible to put an info.plist inside
a jar file
| (well, you can put one there, but it won't be scanned). With a
simple jar
| file you have no control over which JVM is used to run it
unless you use an
| application package or a shell script.

OK. But if it is all 'zipped* up' together
(*or any compression format java understands)
I could also offer the Apple style archive as an
option..

How complicated is the 'application package'
(assuming there are no other jars or resources)?

No, wait, I'll have a trawl round the Apple
site and see if I can figure it out.

Thanks y'all.
 
B

Bill Tschumy

.

Is it all zipped* up?

No, it is a directory that the Finder knows to display as an application. If
you look at with a command line shell, it looks like a regular directory.
OK. But if it is all 'zipped* up' together
(*or any compression format java understands)
I could also offer the Apple style archive as an
option..

You could do this. It is not zipped, but it wouldn't be terribly difficult
to create the directory structure yourself.
How complicated is the 'application package'
(assuming there are no other jars or resources)?

No, wait, I'll have a trawl round the Apple
site and see if I can figure it out.

Check out:
<http://developer.apple.com/documentation/MacOSX/Conceptual/SystemOverview/App
Packaging/chapter_5_section_2.html>

for starters. You might grab a simple packaged Java application and look at
it. This may be hard for you to test and get right without have a Mac to
test on.
 
A

Andrew Thompson

..
....
| > How complicated is the 'application package'
....
| Check out:
|
<http://developer.apple.com/documentation/MacOSX/Conceptual/Syste
mOverview/App
| Packaging/chapter_5_section_2.html>

Thanks, I'll have a look over it.

OK. Two clicks from that at..
http://developer.apple.com/documentation/MacOSX/Conceptual/System
Overview/Bundles/chapter_4_section_3.html#//apple_ref/doc/uid/200
00982/BBCCHFHH

I found this..
Listing 4-1
- MyBundle/
MyApp /* alias to Contents/MacOS/MyApp */
Contents/
MacOSClassic/
Helper Tool
MacOS/
MyApp
Info.plist

I figure I can ignore the ..MacOSClassic/Helper Tool,
so that leaves
/MyApp //the alias
/Contents/MacOS/MyApp //the jar
/Contents/Info.plist //configuration

Any hints on the format of the alias?

I found my way to
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFile
System/Concepts/Aliases.html#//apple_ref/doc/uid/20002288/108339
But it is not specific and all other links I followed
seemed to get me going around in circles.

Is an alias in human readable form?
 
B

Bill Tschumy

...

Thanks, I'll have a look over it.

OK. Two clicks from that at..
http://developer.apple.com/documentation/MacOSX/Conceptual/System
Overview/Bundles/chapter_4_section_3.html#//apple_ref/doc/uid/200
00982/BBCCHFHH

I found this..
Listing 4-1
- MyBundle/
MyApp /* alias to Contents/MacOS/MyApp */
Contents/
MacOSClassic/
Helper Tool
MacOS/
MyApp
Info.plist

I figure I can ignore the ..MacOSClassic/Helper Tool,
so that leaves
/MyApp //the alias
/Contents/MacOS/MyApp //the jar
/Contents/Info.plist //configuration

Any hints on the format of the alias?

I don't know what the alias is for, but I don't think it is important. I
haven't seen any of Apple's tools that create application packages (a.k.a.
bundles) generate an alias there. Here is what is normally created

MyApp.app/
Contents/
Info.plist
PkgInfo ## This file just contains "APPL????"
MacOS/
JavaApplicationStub ## This is a native executable that
launches the Java VM
Resources/
Java/ ## This is where your jar files go
MyApp.icns ## Icon file so Finder can dislay correct icon

Hope that helps.
I found my way to
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFile
System/Concepts/Aliases.html#//apple_ref/doc/uid/20002288/108339
But it is not specific and all other links I followed
seemed to get me going around in circles.

Is an alias in human readable form?

As I said above, this is not needed IMO.
 
A

Andrew Thompson

..

Moments before I posted my long reply,
my Outlook Express realised I was talking
about an enemy system and threw a spaz
before shuttinig istelf down.

I'll try and keep it short, so hopefully I
can get this through (OE may be malevolent,
but it ain't that quick)..

Unfortunately it is looking impractical to
expect my simple little on-line compiler
to handle the requirements of these
applications, especially the launcher
stub.

I will have to admit defeat for the moment. :-(
 
S

Steve W. Jackson

Bill Tschumy said:
:On Wed, 21 Jan 2004 10:50:42 -0600, Andrew Thompson wrote
:(in message <[email protected]>):
:
:> ...
:>> Check out:
:>>
:> <http://developer.apple.com/documentation/MacOSX/Conceptual/Syste
:> mOverview/App
:>> Packaging/chapter_5_section_2.html>
:>
:> Thanks, I'll have a look over it.
:>
:> OK. Two clicks from that at..
:> http://developer.apple.com/documentation/MacOSX/Conceptual/System
:> Overview/Bundles/chapter_4_section_3.html#//apple_ref/doc/uid/200
:> 00982/BBCCHFHH
:>
:> I found this..
:> Listing 4-1
:> - MyBundle/
:> MyApp /* alias to Contents/MacOS/MyApp */
:> Contents/
:> MacOSClassic/
:> Helper Tool
:> MacOS/
:> MyApp
:> Info.plist
:>
:> I figure I can ignore the ..MacOSClassic/Helper Tool,
:> so that leaves
:> /MyApp //the alias
:> /Contents/MacOS/MyApp //the jar
:> /Contents/Info.plist //configuration
:>
:> Any hints on the format of the alias?
:
:I don't know what the alias is for, but I don't think it is important. I
:haven't seen any of Apple's tools that create application packages (a.k.a.
:bundles) generate an alias there. Here is what is normally created
:
:MyApp.app/
: Contents/
: Info.plist
: PkgInfo ## This file just contains "APPL????"
: MacOS/
: JavaApplicationStub ## This is a native executable that
: launches the Java VM
: Resources/
: Java/ ## This is where your jar files go
: MyApp.icns ## Icon file so Finder can dislay correct icon
:
:Hope that helps.
:>
:> I found my way to
:> http://developer.apple.com/documentation/MacOSX/Conceptual/BPFile
:> System/Concepts/Aliases.html#//apple_ref/doc/uid/20002288/108339
:> But it is not specific and all other links I followed
:> seemed to get me going around in circles.
:>
:> Is an alias in human readable form?
:
:As I said above, this is not needed IMO.
:
:>

The "JavaSwingApp" that XCode built for me does not have an alias. And
you'd be hard pressed to create a meaningful alias if you haven't got a
Mac handy anyway. It's vaguely similar to a Windows shortcut, but it's
really a file containing an "alias record" which is described in Apple's
docs someplace.

The "JavaApplicationStub" shown above was provided for my by XCode and
named JavaSwingApp -- I don't know without more research what it
actually has to be, other than that it's identified as a "Unix
Executable File" when I look at it.

Ignoring the Mac OS Classic stuff is probably best anyway, since OS 9
can't run anything better than Java 1.1.8 (and with some tricky help,
you can set it up to use Swing 1.1.1).

= Steve =
 
S

Steve W. Jackson

Andrew Thompson said:
::.
:
:Moments before I posted my long reply,
:my Outlook Express realised I was talking
:about an enemy system and threw a spaz
:before shuttinig istelf down.
:
:I'll try and keep it short, so hopefully I
:can get this through (OE may be malevolent,
:but it ain't that quick)..
:
:Unfortunately it is looking impractical to
:expect my simple little on-line compiler
:to handle the requirements of these
:applications, especially the launcher
:stub.
:
:I will have to admit defeat for the moment. :-(
:
:--
:Andrew Thompson

Not necessarily. A jar file can still be double-clicked in OS X, though
I don't know which JVM it will use if both are available. I just tried
it with the jar file built in my "JavaSwingApp", but it failed because
XCode didn't put a main class entry in the manifest.

= Steve =
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top