Java bundling question

sveijk

Registered
Using MRJAppBuilder, I am trying to build bundles out of the Citrix Java ICA client, but I am stuck on a parameters issue. What I want to do is pass parameters for an ICA published application. I enter the correct syntax (i.e. the parameters that work when I run the class from the command line) in the

com.apple.mrj.application.parameters=

line of the MRJApp.properties file. Unfortunately, some of our published apps have spaces in their names. The bundle truncates the parameter at the first space. I tried quoting with standard unix methods, but it didn't work. Can anyone tell me how to quote these spaces in this file?

Alternatively, the class can accept a .ica text config file as a parameter. I tried

com.apple.mrj.application.parameters=remoteapp.ica

and putting a copy of remoteapp.ica in the bundle's resource directory. But, obviously, it looked for remoteapp.ica in $PWD of the file system, not in the current directory of the bundle. Duh. Is there any syntax I can use to pass that file as a parameter from within the bundle?
 
In case anyone cares, quoting these parameters is impossible.

According to Tech Note 2031,

Property
com.apple.mrj.application.parameters

Defaults
arguments

Function
Space-separated list of arguments which are parsed to build the String[] passed to main


For now, I am passing the parameters as a file in the Resources directory, via a relative path name (com.apple.mrj.application.parameters=./bundle.app/Contents/Resources/configfile). It works, unless of course someone changes the bundle's name.

This is a crap solution. I consider the parameter passing limitation a bug. Nice to see that Steve has made it so that name changes and spaces break applications.
 
Back
Top