Brigit Ananya wrote:
Well, Java programs are not completely portable. Certain things have to be programmed differently for the MAC, such as the About and Quit menu have to be in a different place and the Command key has to be used instead of the Control key.
Done correctly, the Command vs. Control key is portable. There is no reason to hard-code it to any specific modifier. Use java.awt.Toolkit.getMenuShortcutKeyMask().
The About and Quit menu item can also be coded portably. You use Apple's Java extensions, which are stubbed for non-Mac platforms, and take it from there using the "os.name" system property, Class.forName(), or other standard Java reflection features.
'Tis true, most Java apps don't do full integration with Apple's Java extensions, but that's understandable since Apple's classes are Mac-specific. The menu-shortcut modifier, however, is 100% portable Java and has existed since JDK 1.1.
For reference:
<key>Java</key> <dict> <key>ClassPath</key> <string>$JAVAROOT/AnanyaCurves.jar</string> <key>-Xmx512m</key> <string>1.5+</string> <key>ananyacurves.AnanyaCurves</key> <string>Ananya Systems</string>
The ClassPath entry is right, but the rest of the entries are wrong.
A plist dictionary consists of key/value pairs. You've entered "-Xmx512m" as if it were a key whose value is "1.5+". You've also entered "ananyacurves.AnanyaCurves" as if it were a key whose value is "Ananya Systems".
What you want is a key "MainClass" whose value is "ananyacurves.AnanyaCurves", which I presume is the name of the main class. You also want a key "JVMVersion" whose value is "1.5+". Finally, you want a key "VMOptions" whose value is "-Xmx512m".
The first one, with a key "MainClass" is essential: the launcher won't start the Java app without it. The JVMVersion and VMOptions keys are optional, in the sense that they are not required. However, if they are present, they must be well-formed, and if you want the values to be honored, you must make key/value pairs that are well-formed (e.g. "JVMVersion" of "-Xmx512m" won't work).
Since you are also having trouble getting the plain jar-file to work (i.e. the apparent bouncycastle signature problem), I'm not sure that fixing your Info.plist will make the app work. Fixing the Info.plist is a necessary, but may not be a sufficient, condition.
-- GG
|