
en-US.common.Setting_the_JBOSS_HOME_Environment_Variable.xml Maven / Gradle / Ivy
The newest version!
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ <!ENTITY % BOOK_ENTITIES SYSTEM "../${ent.filename}"> %BOOK_ENTITIES; ]> <appendix id="jboss_home_setup"> <title>Setting the JBOSS_HOME Environment Variable</title> <para> The <application>&THIS.PLATFORM; Platform</application> (<application>&THIS.PLATFORM;</application>) is built on top of the <application>&JEE.PLATFORM;</application>. You do not need to set the <envar>JBOSS_HOME</envar> environment variable to run any of the <application>&THIS.PLATFORM; Platform</application> servers <emphasis>unless</emphasis> <envar>JBOSS_HOME</envar> is <emphasis>already</emphasis> set. </para> <para>The best way to know for sure whether <envar>JBOSS_HOME</envar> was set previously or not is to perform a simple check which may save you time and frustration.</para> <formalpara> <title>Checking to See If JBOSS_HOME is Set on Unix</title> <para>At the command line, <command>echo</command> <userinput>$JBOSS_HOME</userinput> to see if it is currently defined in your environment:</para> </formalpara> <!-- ~]$ echo $JBOSS_HOME --> <screen>~]$ echo $JBOSS_HOME</screen> <para>The <application>&THIS.PLATFORM; Platform</application> and most &THIS.PLATFORM; servers are built on top of the <application>&JEE.PLATFORM;</application> (<application>&JEE.PLATFORM;</application>). When the <application>&THIS.PLATFORM; Platform</application> or &THIS.PLATFORM; servers are built <emphasis>from source</emphasis>, then <envar>JBOSS_HOME</envar> <emphasis>must</emphasis> be set, because the &THIS.PLATFORM; files are installed into (or <quote>over top of</quote> if you prefer) a clean <application>&JEE.PLATFORM;</application> installation, and the build process assumes that the location pointed to by the <envar>JBOSS_HOME</envar> environment variable at the time of building is the <application>&JEE.PLATFORM;</application> installation into which you want it to install the &THIS.PLATFORM; files. </para> <para>This guide does not detail building the <application>&THIS.PLATFORM; Platform</application> or any &THIS.PLATFORM; servers from source. It is nevertheless useful to understand the role played by <application>JBoss AS</application> and <envar>JBOSS_HOME</envar> in the &THIS.PLATFORM; ecosystem.</para> <para> The immediately-following section considers whether you need to set <envar>JBOSS_HOME</envar> at all and, if so, when. The subsequent sections detail how to set <envar>JBOSS_HOME</envar> on Unix and Windows </para> <important> <para> Even if you fall into the category below of <emphasis>not needing</emphasis> to set <envar>JBOSS_HOME</envar>, you may want to for various reasons anyway. Also, even if you are instructed that you do <emphasis>not need</emphasis> to set <envar>JBOSS_HOME</envar>, it is good practice nonetheless to check and make sure that <envar>JBOSS_HOME</envar> actually <emphasis>isn't</emphasis> set or defined on your system for some reason. This can save you both time and frustration. </para> </important> <bridgehead>You <emphasis>DO NOT NEED</emphasis> to set <envar>JBOSS_HOME</envar> if...</bridgehead> <itemizedlist> <listitem> <para> ...you have installed the <application>&THIS.PLATFORM; Platform</application> binary distribution. </para> </listitem> <listitem> <para> ...you have installed a &THIS.PLATFORM; server binary distribution <emphasis>which bundles <application>&JEE.PLATFORM;</application>.</emphasis> </para> </listitem> </itemizedlist> <bridgehead>You <emphasis>MUST</emphasis> set <envar>JBOSS_HOME</envar> if...</bridgehead> <itemizedlist> <listitem> <para> ...you are installing the <application>&THIS.PLATFORM; Platform</application> or any of the &THIS.PLATFORM; servers <emphasis>from source</emphasis>. </para> </listitem> <listitem> <para> ...you are installing the <application>&THIS.PLATFORM; Platform</application> binary distribution, or one of the &THIS.PLATFORM; server binary distributions, which <emphasis>do not</emphasis> bundle <application>&JEE.PLATFORM;</application>. </para> </listitem> </itemizedlist> <para> Naturally, if you installed the <application>&THIS.PLATFORM; Platform</application> or one of the &THIS.PLATFORM; server binary releases which <emphasis>do not</emphasis> bundle <application>&JEE.PLATFORM;</application>, yet requires it to run, then you should install before setting <envar>JBOSS_HOME</envar> or proceeding with anything else. </para> <formalpara> <title>Setting the JBOSS_HOME Environment Variable on Unix</title> <para> The <envar>JBOSS_HOME</envar> environment variable must point to the directory which contains all of the files for the <phrase><application>&THIS.PLATFORM; Platform</application> or individual &THIS.PLATFORM; server</phrase> that you installed. As another hint, this topmost directory contains a <filename>bin</filename> subdirectory. </para> </formalpara> <para> Setting <envar>JBOSS_HOME</envar> in your personal <filename>~/.bashrc</filename> startup script carries the advantage of retaining effect over reboots. Each time you log in, the environment variable is sure to be set for you, as a user. On Unix, it is possible to set <envar>JBOSS_HOME</envar> as a system-wide environment variable, by defining it in <filename>/etc/bashrc</filename>, but this method is neither recommended nor detailed in these instructions. </para> <procedure> <title>To Set JBOSS_HOME on Unix...</title> <step> <para> Open the <filename>~/.bashrc</filename> startup script, which is a hidden file in your home directory, in a text editor, and insert the following line on its own line while substituting for the actual install location on your system: </para> <!-- export JBOSS_HOME="/home/<replaceable><username></replaceable>/<replaceable><path></replaceable>/<replaceable><to></replaceable>/<replaceable><install_directory></replaceable>" --> <screen>export JBOSS_HOME="/home/<username>/<path>/<to>/<install_directory>"</screen> </step> <step> <para> Save and close the <filename>.bashrc</filename> startup script. </para> </step> <step> <para> You should <command>source</command> the <filename>.bashrc</filename> script to force your change to take effect, so that <envar>JBOSS_HOME</envar> becomes set for the current session<footnote> <para> Note that any other terminals which were opened prior to your having altered <filename>.bashrc</filename> will need to <command>source</command> <filename>~/.bashrc</filename> as well should they require access to <envar>JBOSS_HOME</envar>. </para> </footnote>. </para> <!-- ~]$ source ~/.bashrc --> <screen>~]$ source ~/.bashrc</screen> </step> <step> <para> Finally, ensure that <envar>JBOSS_HOME</envar> is set in the current session, and actually points to the correct location: </para> <note> <para> The command line usage below is based upon a binary installation of the <application>&THIS.PLATFORM; Platform</application>. In this sample output, <envar>JBOSS_HOME</envar> has been set correctly to the <replaceable>topmost_directory</replaceable> of the <application>&THIS.PLATFORM;</application> installation. Note that if you are installing one of the standalone <application>&THIS.PLATFORM;</application> servers (with <application>JBoss AS</application> bundled!), then <envar>JBOSS_HOME</envar> would point to the <replaceable>topmost_directory</replaceable> of your server installation. </para> </note> <!-- ~]$ echo $JBOSS_HOME /home/silas/&MOB_JBOSS_HOME_LIN; --> <screen>~]$ echo $JBOSS_HOME /home/silas/<path>/<to>/<install_directory></screen> </step> </procedure> <formalpara> <title>Setting the JBOSS_HOME Environment Variable on Windows</title> <para> The <envar>JBOSS_HOME</envar> environment variable must point to the directory which contains all of the files for the <phrase>&THIS.PLATFORM; Platform or individual &THIS.PLATFORM; server</phrase> that you installed. As another hint, this topmost directory contains a <filename>bin</filename> subdirectory. </para> </formalpara> <para> For information on how to set environment variables in recent versions of Windows, refer to <ulink url="http://support.microsoft.com/kb/931715"></ulink>. </para> </appendix>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy