ÒÔjava±à³Ì·½Ê½µ÷Óà Apache Ant
±¾ÎÄÑÝʾÁËÈçºÎͨ¹ý Java µ÷Óà Apache Ant ¹¹½¨Îļþ¡£Äú½«¼ì²é±ØÒªµÄ Java ´úÂë²¢Á˽âÈçºÎÔÚ WebSphere Application Developer ÖÐÔËÐд˴úÂë¡£
ÒýÑÔ
Apache
Ant ÊÇÒ»¸ö»ùÓÚ Java µÄ¿ª·ÅÔ´´úÂë¹¹½¨ÊµÓù¤¾ß¡£ÈËÃdz£°ÑËüÓë Make ½øÐбȽϣ¬Make
³¤ÆÚÒÔÀ´Ò»Ö±ÓÃÓÚ°ïÖú×Ô¶¯Íê³É¹¹½¨¹ý³Ì¡£¾¹ý²»Í¬°æ±¾µÄ¸Ä½ø£¬Ant ÒÑ·¢Õ¹³ÉÒ»¸ö·á¸»µÄ¹¦Äܿ⣬ʹÆä³ÉΪÊÊÓÃÓÚÐí¶à³¡ºÏµÄºÏÊʹ¤¾ß¡£ÀýÈ磬Ant
µÄµ±Ç°°æ±¾ (V1.6.2) ÌṩµÄһЩÈÎÎñ°üÀ¨Á˲Ù×÷ÎļþÄÚÈÝ¡¢Ö´ÐÐÃüÁîÐÐºÍ Java ³ÌÐòÒÔ¼°Æô¶¯ SSH ºÍ FTP Á¬½ÓµÄ¹¦ÄÜ¡£
ÓÉ
ÓÚ¶¨ÒåËùÓй¹½¨Âß¼µÄ Ant ¹¹½¨Îļþ¶¼ÊÇÓà XML
±àдµÄ£¬Òò´Ë£¬Èç¹ûÐèÒª¸ü¸ÄÂß¼£¬Ôò²»ÐèÒªÖØбàÒë´úÂ룬Ҳ²»ÐèÒªÁ˽âÓïÑÔÌض¨µÄÓï·¨¡£´ËÍ⣬Ant ¾ßÓи߶ȵĿÉÀ©Õ¹ÐÔ¡£ËüÌṩÁËʹÓà Java™
´´½¨Äú×Ô¼ºµÄ×Ô¶¨ÒåÈÎÎñµÄ¹¦ÄÜ£¬Ö®ºóÓÖ¿ÉÒÔͨ¹ýÓëʹÓÃÈκÎÆäËû Ant ÈÎÎñÏàͬµÄ·½Ê½Ê¹Óà Java™¡£ËùÓÐÕâЩÁªÏµÔÚÒ»ÆðÒâζ×Å Ant
ÊÇ¿ÉÒÔÖ´ÐкܶàÈÎÎñµÄ¼«ºÃÑ¡Ôñ¡£
ÔÚ´ó¶àÊýÇé¿öÏ£¬Ò»µ©´´½¨ºÃ¹¹½¨Îļþ£¬¾Í¿ÉÒÔ´Ó´øÓÐÊʵ±Ä¿±ê£¨ÀýÈ磬ant dist
£©µÄÃüÁîÐе÷Óà Ant ¿ÉÖ´ÐÐÎļþÀ´Ö´ÐÐËüÃÇ£¬Ò²¿ÉÒÔʹÓà WebSphere® Studio Application Developer (Application Developer) ÄÚÖà Run Ant
ÃüÁîÀ´Ö´ÐÐËüÃÇ¡£È»¶ø£¬Ò²´æÔÚ¸üÊʺÏÓÚ´Ó Java ³ÌÐòÖÐÆô¶¯ Ant µÄÇé¿ö¡£Õâ¿ÉÄÜÒª¸ù¾Ý Java
³ÌÐò¼ì²âµ½µÄij×éÌõ¼þÀ´¿ªÊ¼Ò»ÏµÁеIJÙ×÷£¬»òÕߣ¬ËüÖ»ÊÇÀûÓóÌÐòÄڷḻµÄ Ant
ÄÚÖù¦ÄÜ¡£ÔÚÕâÖÖÇé¿öÏ£¬ÄúÐèÒª¼ÌÐø´´½¨Ò»¸ö¹¹½¨Îļþ£¬¾ÍÏñ´ÓÃüÁîÐе÷Óà Ant ʱÄÇÑù£¬µ«Ö®ºóÄúÐèÒª½«¶Ô Ant Java API
µÄÕýÈ·µ÷ÓòåÈëµ½³ÌÐòÖС£±¾ÎĽ«Í¨¹ý¼ì²é±ØÒªµÄ Java ´úÂë²¢ÏòÄúչʾÈçºÎÔÚ Application Developer
ÄÚÔËÐд˴úÂëÀ´°ïÖúÄú´¦Àí´Ë¹ý³Ì¡£
±¾ÎÄÖ»°üÀ¨Ê¹Óù¹½¨Îļþ´Ó Java Öе÷Óà Ant ÈÎÎñµÄÇé¿ö¡£Óйش˹ý³ÌµÄ¸ü¶àÐÅÏ¢£¬Çë²ÎÔÄ¡¶Apache Ant Óû§ÊֲᡷÖÐµÄ Using Ant Tasks Outside of Ant
¡£
»ØÒ³Ê×
ÒÔ±à³Ì·½Ê½µ÷Óà Ant
±¾ÎÄÖеÄʾÀýʹÓà WebSphere Studio Application Developer 5.1.2¡£ÕâЩʾÀý¿ÉÄÜÒ²ÊÊÓÃÓÚÆäËû°æ±¾£¬µ«ÉÐδ¾¹ý²âÊÔ¡£Äú¿ÉÒÔÏÂÔØ
Ãâ·ÑÊÔÓð汾¡£
´Ó Application Developer Öд´½¨ Ant ¹¹½¨Îļþ
ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«¼òÒªµØ»Ø¹Ë¹¹½¨ÎļþµÄ´´½¨ÒÔ¼°ÆäËû Ant »ù´¡ÖªÊ¶£¬µ«²¢²»ÏêϸÌÖÂÛ¡£ÓйØÏêϸÐÅÏ¢£¬Çë²ÎÔÄÏà¹ØÄÚÈݺͲο¼×ÊÁÏ
²¿·Ö¡£
Ê×ÏÈ£¬´´½¨Ò»¸öÐ嵀 Java ÏîÄ¿¡£×ªµ½ File => New => Project
¡£Ñ¡Ôñ Java => Ja
Ïà¹ØÎĵµ£º
package javatest1014;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
public class ReadExcel{
public static void main(String[] args){
jxl.Workbook workbook=getWorkBook();
......
package chape7;
/**
* 檢²é參數µÄÓÐЧÐÔ
* 當編寫·½·¨»òÕß構ÔìÆ÷時£¬應該¿¼慮ËûµÄ參數ÓÐʲ÷áÏÞÖÆ 應該°É這ЩÏÞÖÆ寫ÔÚÎÄ檔ÖУ¬並ÇÒÔÚ這個·½·¨µÄ開頭 ......
package chape8;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* µÚ°ËÕ ͨÓóÌÐòÉè¼Æ
* µÚ45Ìõ£º ½«¾Ö²¿±äÁ¿µÄ×÷ÓÃÓò¼õСµ½×îС
* ½«¾Ö²¿±äÁ¿µÄ×÷ÓÃÓò×îС»¯¡£¿ÉÒÔÔöÇ¿´úÂëµÄ¿É¶ÁºÍ¿Éά»¤ÐÔ£¬²¢½µµÍ³ö´íµÄ¿ÉÄÜÐÔ
* Ҫʹ×÷ÓÃÓò×îС£¬×îÓÐÁ ......
¡¡Ò»¡¢Àí½â¶àÏß³Ì
¡¡¡¡¶àÏß³ÌÊÇÕâÑùÒ»ÖÖ»úÖÆ£¬ËüÔÊÐíÔÚ³ÌÐòÖв¢·¢Ö´Ðжà¸öÖ¸ÁîÁ÷£¬Ã¿¸öÖ¸ÁîÁ÷¶¼³ÆΪһ¸öỊ̈߳¬±Ë´Ë¼ä»¥Ïà¶ÀÁ¢¡£
¡¡¡¡Ïß³ÌÓÖ³ÆΪÇáÁ¿¼¶½ø³Ì£¬ËüºÍ½ø³ÌÒ»ÑùÓµÓжÀÁ¢µÄÖ´ÐпØÖÆ£¬ÓɲÙ×÷ϵͳ¸ºÔðµ÷¶È£¬Çø±ðÔÚÓÚÏß³ÌûÓжÀÁ¢µÄ´æ´¢¿Õ¼ä£¬¶øÊǺÍËùÊô½ø³ÌÖеÄÆäËüÏ̹߳²ÏíÒ»¸ö´æ´¢¿Õ¼ä£¬ÕâʹµÃÏ̼߳äµÄͨÐÅ ......
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.FileOutputStream;
import java.util.Random;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
/**
* ¹¦ÄÜÃèÊö ......