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

java°Ñwordתhtml»òtxt

×î½üÏîÄ¿ÖÐÐèÒªÔÚÒ³ÃæÖÐÔ¤ÀÀwordÎļþ£¬Ëä˵word±¾Éí¾Í¿ÉÒÔÔÚÒ³ÃæÖдò¿ª£¬µ«ÊÇÓÐÁ½¸ö±×¶Ë£¬1ÊÇ¿É¿Í»§¶Ë±ØÐë°²×°word£¬ 2ÊÇ¿Í»§¶ËµÄ»·¾³ÒÔ¼°office°æ±¾ÓвîÒ죬»áÔì³ÉÔ¤ÀÀ²»Îȶ¨¡£ÔÚÍøÉÏÕÒÁËһϣ¬·¢ÏÖpoi¿ÉÒÔ°Ñword×°»»³Étxt,µ«ÊǸñʽ¶¼¶ªÁË,Ö»ÓйâͺͺµÄÎı¾,ÓÖËÑjacob, ÍøÓÑÃÇÖÚ˵·×ç¡, ×îºó»¹ÊÇ×Ô¼ºsourceforgeÉÏÏÂÔØjacob²¢ÔĶÁdoc¸ã¶¨ÁË.
1 goto http://sourceforge.net/projects/jacob-project/ and download latest library of jacob.
ÏÂÔصÄzipÎļþ½á¹¹ÈçÏÂ:
2 intel cpuµÄ»úÆ÷¿½±´jacob-1.15-M3-x86.dllµ½%JAVA_HOME%/jre/bin, AMD cpuµÄ»úÆ÷¿½±´jacob-1.15-M3-x64.dll. ²»¹ýÇëÈ·±£jreĿ¼ÊÇÄãÕýÔÚʹÓõÄjre, ÒòΪÏÖÔںܶàeclipse°æ±¾×Ô¼º´øjre. Õâ¸öÔÚeclipse windows-> preferences -> installed jres¿ÉÒԲ鿴.
3 ¿½±´jacob.jarµ½ÄãÏîĿĿ¼µÄlibÏÂÃ沢ȷ±£¼ÓÈëµ½ÁËclasspath.
×¼±¸¹¤×÷Íê±Ï, ÏÖÔÚ¾Íд³ÌÐòÁË.
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;
public class Test {
public static void main(String[] args) {
ActiveXComponent app = new ActiveXComponent("Word.Application");
app.setProperty("Visible", new Variant(false));
Dispatch doc1 = app.getProperty("Documents").toDispatch();
//´ò¿ªaaaa.doc
Dispatch doc2 = Dispatch.invoke(
doc1,
"Open",
Dispatch.Method,
new Object[]{"e:\\aaaa.doc", new Variant(false), new Variant(true)},
new int[1]
).toDispatch();
//Áí´æΪaaaa.html
Dispatch.invoke(
doc2,
"SaveAs",
Dispatch.Method,
new Object[]{
"c:\\aaaa.html",
new Variant(8)//7Ϊtxt¸ñʽ£¬ 8±£´æΪhtml¸ñʽ
},
new int[1]
);
Variant f = new Variant(false);
Dispatch.call(doc2, "Close", f);
}
}
ʹÓÃÆðÀ´ºÜ¼òµ¥.
µ±È»jacob²»¹â¿ÉÒÔ×öword to html, »¹¿ÉÒÔ×öºÜ¶àÊÂÇé:
Jacob is a Java library that lets Java applications communicate with Microsoft Windows DLLs or COM libraries. It does this through the use of a custom DLL that the Jacob Java classes communicate with via JNI. The library and dll isolate the Java developer from the underlying windows libraries so that


Ïà¹ØÎĵµ£º

µãÕó×Ö¿âÔÚJAVAÖеÄʵÏÖ

±¾ÎÄת×Ô£ºhttp://hi.baidu.com/%E6%AD%A3%E9%81%93%E6%B0%94%E5%8A%9F/blog/item/70a90e01e69516e708fa93c6.html
ÓÉÓÚ±¾ÈËÔÚ×ö MOTO ÊÖ»úÉϵÄÒ»¿îÔĶÁÆ÷
Anyview ʱ£¬²¢²»ÂúÒâÊÖ»ú×Ô´øµÄ×ֿ⣬Òò´Ë£¬Ê¹ÓÃÁËÍâ¹Ò×ֿ⣬ÔÚ±àÂë¹ý³ÌÖУ¬×ܽáÁËһЩ¾­Ñ飬ÌؼǼÏÂÀ´Óë´ó¼Ò·ÖÏí¡£ËäÈ»ÔĶÁÆ÷ÊÇʹÓà J2ME
¿ª·¢£¬µ«Æä»ù±¾Ô­ÀíÊ ......

Java¿ªÔ´ J2EE¿ò¼Ü


Spring Framework ¡¾Java¿ªÔ´ J2EE¿ò¼Ü¡¿ 
SpringÊÇÒ»¸ö½â¾öÁËÐí¶àÔÚJ2EE¿ª·¢Öг£¼ûµÄÎÊÌâµÄÇ¿´ó¿ò¼Ü¡£ SpringÌṩÁ˹ÜÀíÒµÎñ¶ÔÏóµÄÒ»Ö·½·¨²¢ÇÒ¹ÄÀøÁË×¢Èë¶Ô½Ó¿Ú±à³Ì¶ø²»ÊǶÔÀà±à³ÌµÄÁ¼ºÃÏ°¹ß¡£SpringµÄ¼Ü¹¹»ù´¡ÊÇ»ùÓÚʹÓÃJavaBeanÊôÐ﵀ Inversion of ControlÈÝÆ÷¡£È»¶ø£¬Õâ½ö½öÊÇÍêÕûͼ¾°ÖеÄÒ»²¿·Ö£ºSpringÔÚʹ ......

JavaÃÕÌâ1 6¶àÖØתÐÍ

תÐͱ»ÓÃÀ´½«Ò»¸öÊýÖµ´ÓÒ»ÖÖÀàÐÍת»»µ½ÁíÒ»ÖÖÀàÐÍ¡£ÏÂÃæµÄ³ÌÐòÁ¬ÐøʹÓÃÁËÈý¸öתÐÍ¡£ÄÇôËüµ½µ×»á´òÓ¡³öʲôÄØ£¿
public class Multicast{
public static void main (String[] args){
System.out.println((int)(char)(byte) -1);
}
}
ÎÞÂÛÄãÔõÑù·ÖÎöÕâ¸ö³ÌÐò£¬¶¼»á¸Ðµ½ºÜÃÔ»ó¡£ËüÒÔintÊýÖµ-1¿ªÊ¼£¬È»ºó´ÓintתÐÍÎ ......

¸Õ¸ÕÕÒ³öÀ´µÄÏà¶Ô׼ȷµÄ²éÕÒHTMLµÄÕýÔò±í´ïʽ

Dim objReg,objMatches,objMatch
Set objReg=new RegExp
objReg.Global=True
objReg.IgnoreCase=True
objReg.Pattern="<('[^']*'|""[^""]*""|[^'"">])*?>"
Set objMatches=objReg.Execute(×Ö·û´®)
For Each objMatch In objMatches
ÕÒµ½µÄHTML £ºobjMatch.value
Next
Set objMatches=Nothing
Set objRe ......

html ³¬Á´½Ó a ÊôÐÔ

html ³¬Á´½Ó ÊôÐÔ
HTML ʹÓ󬼶Á´½ÓÓëÍøÂçÉϵÄÁíÒ»¸öÎĵµÏàÁ¬¡£
ê±êÇ©ºÍ Href ÊôÐÔ
HTML ʹÓà <a> £¨Ãª£©±êÇ©À´´´½¨Á¬½ÓÁíÒ»¸öÎĵµµÄÁ´½Ó¡£
ê¿ÉÒÔÖ¸ÏòÍøÂçÉϵÄÈκÎ×ÊÔ´£ºÒ»ÕÅ HTML Ò³Ã棬һ·ùͼÏñ£¬Ò»¸öÉùÒô»òÊÓƵÎļþµÈµÈ¡£
´´½¨ÃªµÄÓï·¨£º
<a href="url">Text to be displayed</a>
ÀýÈ磺
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ