Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaƽ̨ÏÂͨ¹ýjacob¶Ôexcel,word½øÐдòÓ¡µÈ²Ù×÷

  ÒòΪÏîÄ¿ÓиöÐèÇó£¬ÒªÇóÄܹ»ÔÚij¸öÔ¤¶¨Ê±¼ä¶ÔÌØ¶¨±¨±í½øÐÐ×Ô¶¯´òÓ¡¡£±¨±íµÄÐÎʽÖ÷ÒªÊÇexcel¡£Èç¹ûÊÇc++»òÕßc#ʲôµÄ£¬¼òÖ±ÊÇС²ËÒ»µú¡£¿Éϧ£¬Æ«Æ«ÊÇjavaʵÏÖ¡£²¢ÇÒ£¬ÕâÓÖ²»Í¬ÓÚ³£¼ûµÄÒ³ÃæÊÖ¹¤´òÓ¡£¬¿ÉÒÔͨ¹ýjavascriptµ÷ÓôòÓ¡»úÀ´ÊµÏÖ¡£ÓÚÊǺõ£¬¿ªÊ¼ÃþË÷ÈçºÎʵÏָù¦ÄÜ¡£
      Ê×ÏÈÏëµ½µÄÊÇjava×Ô´øµÄ´òÓ¡Àà¡£ÔÚjavax.print°üÏ¡£¸ù¾Ýjdk˵Ã÷£¬ÕÕ×ŰáÀ´Á˸ö³ÌÐò£¬Ð¡ÊÔÅ£µ¶¡£
/**
* @author xjj
* ˵Ã÷:´òÓ¡Àà
* email: exceljava@163.com
* @date Oct 29, 2008
*/
public class AutoPrint {
public static void main(String[] args) {
FileInputStream psStream;
try {
psStream = new FileInputStream("file.ps");
} catch (FileNotFoundException ffne) {
}
if (psStream == null) {
return;
}
DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
Doc myDoc = new SimpleDoc(psStream, psInFormat, null);
PrintRequestAttributeSet aset =
new HashPrintRequestAttributeSet();
aset.add(new Copies(5));
aset.add(MediaSize.A4);
aset.add(Sides.DUPLEX);
PrintService[] services =
PrintServiceLookup.lookupPrintServices(psInFormat, aset);
if(services.length<1){
throw new RuntimeException("ÕÒ²»µ½´òÓ¡»ú");
}
if (services.length > 0) {
DocPrintJob job = services[0].createPrintJob();
try {
job.print(myDoc, aset);
} catch (PrintException pe) {}
}

}  
ͨ¹ý²âÊÔ£¬Ê¼ÖÕÎÞ·¨ÕÒµ½´òÓ¡»ú£¬ÔËÐÐʱ±¨¶¨ÒåµÄ:ÕÒ²»µ½´òÓ¡»ú¡£Ìý˵£¬¾ÖÓòÍøÄڵĴòÓ¡»úÎÞ·¨Á´½Ó£¬´òÓ¡»úÖ»ÄÜÁ¬ÔÚ±¾»úÉÏ¡£¶ø²âÊԵĴòÓ¡»ú¸ÕºÃÔÚ¾ÖÓòÍøÄÚ¶ø²»ÔÚ±¾»úÉÏ¡£È»ºó£¬²é¿´ÁËÏÂÎĵµ£¬ºöÈ»·¢ÏÖ£¬java×Ô´øµÄ´òÓ¡Ö»¶ÔplainÎı¾£¬gif£¬jpeg,pdfµÈÖ§³Ö£¬¶ø¶Ôexcle£¬wordµÈÊDz»Ö§³ÖµÄ¡£¿´À´ÒªÑ§»á·ÅÆú£¬goodbye java print¡£
       ÓеÀÊÇ£º³µµÀɽǰ±ØÓз¡£Õâ²»£¬¹Ø¼üʱ¿Ì£¬jacob³ö


Ïà¹ØÎĵµ£º

Java¶¯Ì¬°ó¶¨

ÔËÐÐʱ°ó¶¨Ò²½Ð¶¯Ì¬°ó¶¨£¬ËüÊÇÒ»ÖÖµ÷ÓöÔÏó·½·¨µÄ»úÖÆ¡£Javaµ÷ÓöÔÏó·½·¨Ê±£¬Ò»°ã²ÉÓÃÔËÐÐʱ°ó¶¨»úÖÆ¡£
1£®JavaµÄ·½·¨µ÷Óùý³Ì
±àÒëÆ÷²é¿´¶ÔÏóµÄÉùÃ÷ÀàÐͺͷ½·¨Ãû£¨¶ÔÏó±äÁ¿µÄÉùÃ÷ÀàÐÍ£©¡£Í¨¹ýÉùÃ÷ÀàÐÍÕÒµ½·½·¨ÁÐ±í¡£
±àÒëÆ÷²é¿´µ÷Ó÷½·¨Ê±ÌṩµÄ²ÎÊýÀàÐÍ¡£
Èç¹û·½·¨ÊÇprivate¡¢static¡¢final»òÕß¹¹ÔìÆ÷£¬±àÒëÆ ......

JavaÃæÊÔÌ⣨2£©

20¡¢abstract classºÍinterfaceÓÐÊ²Ã´Çø±ð?
¡¡¡¡ÉùÃ÷·½·¨µÄ´æÔÚ¶ø²»È¥ÊµÏÖËüµÄÀà±»½Ð×ö³éÏóÀࣨabstract class£©£¬ËüÓÃÓÚÒª´´½¨Ò»¸öÌåÏÖijЩ»ù±¾ÐÐΪµÄÀ࣬²¢Îª¸ÃÀàÉùÃ÷·½·¨£¬µ«²»ÄÜÔÚ¸ÃÀàÖÐʵÏÖ¸ÃÀàµÄÇé¿ö¡£²»ÄÜ´´½¨abstract ÀàµÄʵÀý¡£È»¶ø¿ÉÒÔ´´½¨Ò»¸ö±äÁ¿£¬ÆäÀàÐÍÊÇÒ»¸ö³éÏóÀ࣬²¢ÈÃËüÖ¸Ïò¾ßÌå×ÓÀàµÄÒ»¸öʵÀý¡£²»ÄÜÓг ......

JavaÃæÊÔÌ⣨6£©

94¡¢ÅÅÐò¶¼ÓÐÄļ¸ÖÖ·½·¨£¿ÇëÁо١£ÓÃJAVAʵÏÖÒ»¸ö¿ìËÙÅÅÐò¡£
     ÅÅÐòµÄ·½·¨ÓУº²åÈëÅÅÐò£¨Ö±½Ó²åÈëÅÅÐò¡¢Ï£¶ûÅÅÐò£©£¬½»»»ÅÅÐò£¨Ã°ÅÝÅÅÐò¡¢¿ìËÙÅÅÐò£©£¬Ñ¡ÔñÅÅÐò£¨Ö±½ÓÑ¡ÔñÅÅÐò¡¢¶ÑÅÅÐò£©£¬¹é²¢ÅÅÐò£¬·ÖÅäÅÅÐò£¨ÏäÅÅÐò¡¢»ùÊýÅÅÐò£©
¿ìËÙÅÅÐòµÄα´úÂë¡£
/ /ʹÓÿìËÙÅÅÐò·½·¨¶Ôa[ 0 :n- 1 ]ÅÅÐò
´Ó ......

´«ÖDz¥¿ÍµÄJAVA SE¸ß¼¶ÊÓÆµ2 IO ×Ôѧ±Ê¼Ç

´«ÖDz¥¿ÍµÄJAVA SE¸ß¼¶ÊÓÆµ2 IO ×Ôѧ±Ê¼Ç:
FileÀࣺ
    1.IO°üÖÐΨһ´ú±í´ÅÅÌÎļþ±¾ÉíÐÅÏ¢µÄÀ࣬¶ø²»ÊÇÎļþÖÐÄÚÈÝ¡£
    2.´´½¨¡¢É¾³ý¡¢ÖØÃüÃûÎļþµÈ·½·¨¡£
    3.JavaÖÐĿ¼±»µ±×÷Ò»ÖÖÌØÊâÎļþʹÓã¬list·½·¨·µ»ØËùÓÐ×ÓĿ¼ºÍÎļþ¡£
    4.UnixÏ·¾¶· ......

JavaÖ®@SuppressWarnings

ÓÃÁËÕâ¸ö£¬MyEclipseÀï¾Í²»»á±¨ÄÇЩ¾¯¸æÁË£¬¿´ÆðÀ´Æ¯ÁÁ¶àÁË
³£Óõģº
@SuppressWarnings("unchecked"),·ºÐÍ
@SuppressWarnings("deprecation"), deprecated·½·¨
@SuppressWarnings(value={"deprecation","unchecked"}) ˫ѡ
@SuppressWarnings("serial"), ÐòÁл¯
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ