When starting an application you could provide sys props
java -jar MyFatJar.jar -Dkey=value
When using OneJar you´re using a starter class. This
class could set these values.
Logged In: YES
I am not sure about the advantages of setting properties
The Properties can also be set before the -jar option:
java -Dkey=value -jar MyFatJar.jar
So why should there be another stub doing some args-parsing?
Logged In: YES
Maybe the JAR is not startable if a sysprop is not set (e.g.
path to SWT-dll), therefore it has to be started via shell.
Of course you could use the values defined in a run
And - its up to the developer to define these settings ...
Setting the system-property for the SWT.dll at runtime
(java.library.path) will not work, because the VM needs this
When using One-Jar, there is a boot-loader which is executed
prior to the main-class, but it only installs an own
Class-Loader, it does not start a new VM. So it is to late
to pass any parameters to the VM.
Do you still think there is a need for this feature?
I dont think it should always be active.
Perhaps some application await a parameter like "-Dxyz" and
it should not be preprocessed and omitted by the boot-loader.
I have lowerd the priority to low, this feature will be
interesting together with "Analyse Run Configurations",
where the args can be taken from the launch-configuration.
I think about special entries in the Manifest.mf like
"application-args: -Dxyz=abc ./test.txt" which are then
provided as args for the main methode.
Ok, the java.library.path is a special case, but you could
set any other props. But - of course - it would be a nice
feature in combination with my other RFE.
And as every RFE - its up to you to priorize that :-)
The feature will be integrated in one of the next releases.
There will be a check-box "parse System-Properties from
command line". The check box can only be activated, if the
manifest file is generated by the plug-in.
If the check box is checked the line "FJParse-SysProps:
true" will be added to the generated manifest file. Also the
entry "Main-Class" will be changed to
"net.sf.fjep.bootstrap.BootStrapLoader" and a new entry
"FJMain-Class" contains the originaly set mainclass.
If FJParse-SysProps is set to true all comman-lines matching
"-D<key>=<value>" will be interpreted and filtered out.