########################################################################## # Java Notes # # Anuradha Weeraman, 06 June 2004 # # $Id: java-notes.txt,v 1.1 2004/06/02 21:17:53 anuradha Exp $ # ########################################################################## --- Ant Ant quick install : 1) Download Apache Ant binary tarball from http://jakarta.apache.org/ant 2) Untar it to /usr/local e.g. /usr/local/jakarta-ant-1.5 3) Add /usr/local/jakarta-ant-1.5/bin to $PATH by editing ~/.bash_profile 4) Make sure Java has been installed, and is added to $PATH 5) Add the following environmental variables to ~/.bash_profile JAVA_HOME=/usr/local/j2sdk1.4.0_01 ANT_HOME=/usr/local/jakarta-ant-1.5 6) Source ~/.bash_profile source ~/.bash_profile or . ~/.bash_profile 7) Type 'ant -version' If it is successfully installed, it will print the version number else it will complain. ---------- --- Connecting to MySQL from JBoss 1) Get the mysql-connector from mysql.com. It'll be something like mysql-connector-java-2.0.14.tar.gz. 2) Untar it and copy mysql-connector-java-2.0.14-bin.jar to /usr/local/jboss_tomcat/server/default/lib. 3) Copy /usr/local/jboss_tomcat/docs/examples/jca/mysql-service.xml to /usr/local/jboss_tomcat/server/default/deploy. 4) Edit as follows : --snip-- MySqlDS jdbc:mysql://localhost:3306/anuradha org.gjt.mm.mysql.Driver anuradha superman --snip-- Make sure MySQL is installed, running, and the proper accounts are setup. 5) Edit /usr/local/jboss_tomcat/server/default/conf/standardjaws.xml and do the following : java:/MySqlDS mySQL java:/MySqlDS can now be used for any container managed entity beans. Ant and xdoclet might require configuring to do this, like specifying datasource.name=java:/MySqlDS in ant.properties. Just an example. ----------