
		====================
		How to compile JOnAS
		====================


This is the content of the "How to compile JOnAS" Guide which is also available
in the JOnAS documentation at http://www.objectweb.org/jonas/doc.


1) Using Ant
------------

   1. Download Ant from http://jakarta.apache.org/ant/. 
	You will find the build.xml file used for building JOnAS in
	objectweb/jonas directory.

   2. Set the following environment variables with the correct value: 
	JONAS_ROOT
	OBJECTWEB_ORB
	TOMCAT_HOME

	The first JONAS_ROOT is mandatory, the second has RMI as default value,
	if the third is empty the servlet related part of JOnAS's code will not built. 
	(If you want to rebuild JOnAS on JEREMIE instead of RMI you have to
	set OBJECTWEB_ORB=JEREMIE in your environment).

   3. build.properties file may be customized to set the correct path to jdbc driver
      (this is used for generating the correct config_env script).

   4. All you have to do is:
	cd $OBJECTWEB_HOME/jonas 
	sh build.sh install on Unix or 
	build install on Windows 

The result of the build will be equivalent to a binary distribution and will
be installed under JONAS_ROOT. 

Furthermore if TOMCAT_HOME was set, the jadmin part of JOnAS and the corresponding
jadmin.war will be installed under $TOMCAT_HOME/webapps. 



2) Using Make
-------------

   1. Download the GNU make utility from GNU site:
	"http://www.gnu.org/software/make/make.html. 

	For NT users, you have to download cygnus tools that will provide you
	with a Unix like environment.
	Look at "http://sourceware.cygnus.com/cygwin/download.html".

   2. Set the following environment variables with the correct value: 
	JONAS_ROOT 
	OBJECTWEB_ORB 
	TOMCAT_HOME 

	The first JONAS_ROOT is mandatory, the second has RMI as default value,
	if the third is empty the servlet related part of JOnAS's code will not built. 
	(If you want to rebuild JOnAS on JEREMIE instead of RMI you have to
	 set OBJECTWEB_ORB=JEREMIE in your environment)

   3. Set the correct paths for all the jar files included in classpath. 

	For this, edit the file $OBJECTWEB_HOME/jonas/gmk/config.mk and
	follow the instructions at the end of the file.

   4. All you have to do is: 

	cd $OBJECTWEB_HOME/jonas 
	make install 

The result of the build will be equivalent to a binary distribution and will
be installed under JONAS_ROOT. 

Furthermore if TOMCAT_HOME was set, the jadmin part of JOnAS and the corresponding
jadmin.war will be installed under $TOMCAT_HOME/webapps. 
