Java service wrapper and additional application command line parameters -
I am currently using to wrap a Java application that I have developed through the Java service cover The ability to pass extra command line parameters for your application is required.
Show me that my app is called Mypape and I have setup the Java service cover so that I run the script, myapp is called, I want to be able to do something like this:
./ myapp start parameter1 parameter2
and those additional parameters are passed in my application. Any ideas how to do this? I am finding out how to use the command line argument to set the Java service wrapper to googling and viewing the documentation. I have difficulty finding anything about running the command line arguments in your application. Besides, besides being coded in your wrapper.conf file.
Now I think my option is to set additional command line parameters, set them in environment variable and place those hard codes in wrapper.conf. I do not like going down that path and hoping that I have ignored something.
3.5.2 Release cover, what do we do for you using the Java application parameter before Asking to add, the possibility of getting it added:
This is basically working to make binary calls directly for the shell, but for the shell script you can easily get it by modifying it a bit : Open the script and in the console (), start () (and optionally the Londenner To set (()) the following command_line:
COMMAND_LINE = "$ CMDNICE \" $ WRAPPER_CMD \ "$ WRAPPER_CONF \" wrapper.syslog.ident = \ "$ APP_NAME \ "Wrapper.pidfile = \" $ PIDFILE \ "wrapper.name = \" $ APP_NAME \ "wrapper.displayname = \" $ APP_LONG_NAME \ "$ ANCHORPROP $ STATUSPROP $ LOCKPROP $ @"
Note $ End at $ @.
Now, the script has to go to the very end, where it decides which function to call (console, start, stop, 'console', 'start Set a change in '(and' londeninantal ') and command on parameter from command line You have to:
'Console') Czech user Tclok $ 1 shift console $ @ ;; 'Start') if ["$ DIST_OS" = "Macx" -a "F" / library / launch daemon / $ {APP_PLIST} "];]; then start the Shift of $ 1 for Macscold and Czech user Tchalkel $ @ Fi ;;
.. 'launchdinternal')
Start shifts $$; ;;
After this, You can call the script like this:
./start script | console - paragraph 1 paragraph 2 ...
Hope it helps.
Cheers, Christian
Comments
Post a Comment