JIRA 4.0 : Setting properties and options on startup
This page last changed on Jun 18, 2009 by rosie@atlassian.com.
This page describes how to set Java properties and options on startup, in various application servers.Java applications can be configured on startup by setting command-line options called system properties. For instance, one can set the default encoding with file.encoding or the timezone with user.timezone, or language with user.language (and many others). The general format for setting properties on the command-line is -Dname=value. For example, here is how the Orion application server is started, where the file.encoding property is set to utf-8: java -Dfile.encoding=utf-8 -jar orion.jar -userThreads Other app servers have startup and shutdown scripts. The same -Dname=value options are set under the covers, but the means of setting properties varies. Setting properties and options on startupIn Tomcat (eg. JIRA Standalone)Tomcat installed as a Windows Service:Identify the name of the service that JIRA is installed as in Windows ( Control Panel > Administrative Tools > Services ): In the above example, the SERVICENAME is: JIRA030908110721 Open command window, and cd to the bin directory of your JIRA Standalone instance, or the bin directory of your Tomcat installation if your are running JIRA EAR/WAR. Run: tomcat5w //ES//%SERVICENAME%. In my example, it would be tomcat5w //ES//JIRA030908110721 Click on the Java tab to see the list of current start-up options: Append any new option on its own new line by adding to the end of the existing Java Options. Modify via the Registry EditorYou can also check the properties by viewing the option list in the registry. Go to Start -> Run, and run "regedt32.exe". For JIRA, there should be an entry at HKEY_LOCAL_MACHINE -> SOFTWARE -> Apache Software Foundation -> Procrun 2.0 -> JIRA. Tomcat on Windows, running startup.bat:Right-click 'My Computer', go to Properties -> Advanced -> Environment Variables and set JAVA_OPTS to the desired value: In Linux/*nix:Set: export JAVA_OPTS=-Dname1=value1 -Dname2=value2 ... on the command-line before starting Tomcat, in your ~/.bash_profile or at the beginning of the the startup script (bin/setenv.sh for Linux or bin\setenv.bat for Windows). Please note, if setenv.sh(bat) does not exist in your Tomcat, you can create it manually. JBossThe JBoss run.sh and run.bat also use the JAVA_OPTS variable, so see the above instructions for Tomcat. To set JAVA_OPTS in the JBoss script, edit bin/run.conf (Unix) or bin/run.bat (Windows). WeblogicEdit $WEBLOGIC/domains/domain/startWebLogic.sh (or .bat), and add properties to the end of the JAVA_OPTIONS value. OrionAs shown above, simply specify -Dname=value after the 'java' command, before the '-jar' part. java -Dfile.encoding=utf-8 -jar orion.jar -userThreads ResinEdit bin/wrapper.pl, and set the property in the $JAVA_ARGS variable. JettyAs with Orion, properties can be passed to Jetty directly on the command-line: java -Dfile.encoding=utf-8 -jar start.jar JIRA Startup PropertiesJIRA also has a few internal startup options that can be set, some of these are used for debugging but a few may come in handy. Note that some of these are configurable via the Administration sections of JIRA. java -Dmail.debug=false -Djira.jelly.on=true -Datlassian.mail.fetchdisabled=true -Djira.trackback.senddisabled=true -Dmail.debug=(true|false) — will enable/disable SMTP mail debugging (but note this will only work in 3.7.2+). ![]() ![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on Oct 06, 2009 00:26 |