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

Java³éÈ¡Word£¬PDFµÄËÄÖÖÎäÆ÷

ÔÚÕâÀï×ܽáһϳéÈ¡word,pdfµÄ¼¸ÖÖ·½·¨¡£
ºÜ¶àÈËÓÃjava½øÐÐÎĵµ²Ù×÷ʱ¾­³£»áÓöµ½Ò»¸öÎÊÌ⣬¾ÍÊÇÈçºÎ»ñµÃword£¬excel£¬pdfµÈÎĵµµÄÄÚÈÝ£¿ÎÒÑо¿ÁËһϣ¬ÔÚÕâÀï×ܽáһϳéÈ¡word,pdfµÄ¼¸ÖÖ·½·¨¡£
1. ÓÃjacob
ÆäʵjacobÊÇÒ»¸öbridage£¬Á¬½ÓjavaºÍcom»òÕßwin32º¯ÊýµÄÒ»¸öÖмä¼þ£¬jacob²¢²»ÄÜÖ±½Ó³éÈ¡word,excelµÈÎļþ£¬ÐèÒª×Ô¼ºÐ´dllŶ£¬²»¹ýÒѾ­ÓÐΪÄãдºÃµÄÁË£¬¾ÍÊÇjacobµÄ×÷ÕßÒ»²¢ÌṩÁË¡£
jacob jarÓëdllÎļþÏÂÔØ£º http://danadler.com/jacob/
ÏÂÔØÁËjacob²¢·Åµ½Ö¸¶¨µÄ·¾¶Ö®ºó(dll·Åµ½path,jarÎļþ·Åµ½classpath)£¬¾Í¿ÉÒÔдÄã×Ô¼ºµÄ³éÈ¡³ÌÐòÁË£¬ÏÂÃæÊÇÒ»¸ö¼òµ¥µÄÀý×Ó£º
import java.io.File;
import com.jacob.com.*;
import com.jacob.activeX.*;
/**
 * Title: pdf extraction
 * Description: email:chris@matrix.org.cn
 * Copyright: Matrix Copyright (c) 2003
 * Company: Matrix.org.cn
 * @author chris
 * @version 1.0,who use this example pls remain the declare
 */
public class FileExtracter{
 public static void main(String[] args) {
  ActiveXComponent component = new ActiveXComponent("Word.Application");
  String inFile = "c:\\test.doc";
  String tpFile = "c:\\temp.htm";
  String otFile = "c:\\temp.xml";
  boolean flag = false;
  try {
   component.setProperty("Visible", new Variant(false));
   Object wordacc = component.getProperty("document£®").toDispatch();
   Object wordfile = Dispatch.invoke(wordacc,"Open", Dispatch.Method,
                                     new Object[]{inFile,new Variant(false), new Variant(true)},
                                     new int[1] )


Ïà¹ØÎĵµ£º

java ÈÕÆÚ¸ñʽ»¯

1 SimpleDateFormatµ£µ±ÖØÈÎ,ÔõÑù¸ñʽ»¯¶¼ÐÐ
import java.util.Date;
import java.text.SimpleDateFormat;
public class Demo
{
public static void main(String[] args)
{
Date now=new Date();
SimpleDateFormat f=newSimpleDateFormat("½ñÌìÊÇ"+"yyyyÄêMMÔÂddÈÕ E kkµãmm·Ö");
System.out.println(f.fo ......

MyEclipse×¢²áJAVA³ÌÐò´úÂ룡

package cn.vicky.reg;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MyEclipseReg {
// ///////////////////////////////////////////////////////////
// ÔËÐиÃÎļþ ÊäÈëÓû§Ãû µã»÷»Ø³µ¼´¿ÉÉú³É MyEclipse 6.0 ºÍ 7.0 ͨÓû§×¢²áÂë
// ///// ......

·¢ÏÖJavaºËÐļ¼ÊõµÚÆß°æÖÐÎÄÒ»´¦ÑÏÖØ·­Òë´íÎó

Java2ºËÐļ¼ÊõµÚÆß°æÖÐÎÄ°æµÚ¶þ¾í
µÚ600Ò³£¬¾¯¸æ´¦ÕâÑù˵£º
Èç¹û½«jar·ÅÈëjre/lib/extĿ¼ÖУ¬²¢ÇÒÔÚËüµÄÀàÖÐÓÐÒ»¸öÀàÐèÒªµ÷ÓÃϵͳÀà»òÕßÀ©Õ¹À࣬ÄÇô¾Í»áÓöµ½Âé·³¡£À©Õ¹Àà¼ÓÔØÆ÷²¢²»Ê¹ÓÃÀà·¾¶¡£

¸Õ¶Áµ½ÕâÀïÊ®·Ö²»½â£¬ÎªÊ²Ã´Óõ½ÏµÍ³Àà»òÀ©Õ¹Àà»á·¢Éú´íÎ󣿲¢ÇÒÒ»¸öÀàÔõô¿ÉÄܲ»»áÓõ½ÏµÍ³ÀࣿÓÚÊÇ£¬ÕÒµ½Ó¢ÎÄ°æÔ­ÎÄÈ ......

¹ØÓÚjavaµÄ¼¯ºÏÀà,ÒÔ¼°HashMapÖÐSetµÄÓ÷¨!

package com.tiantian;
import java.util.*;
public class JAVAContainer {
     public static void main(String[] args) throws Exception {
         //     ArrayList
         {
&nb ......

java socket±à³Ì

Ç°Ò»¶Îʱ¼ä¸Õ×öÁ˸öjava³ÌÐòºÍÍøÂçÉ϶ą̀»úÆ÷µÄc³ÌÐòͨѶµÄÏîÄ¿£¬×ñÑ­µÄÊÇTCP/IPЭÒ飬Óõ½ÁËjavaµÄSocket±à³Ì¡£ÍøÂçͨѶÊÇjavaµÄÇ¿ÏÓÃTCP/IPЭÒé¿ÉÒÔ·½±ãµÄºÍÍøÂçÉϵÄÆäËû³ÌÐò»¥Í¨ÏûÏ¢¡£
ÏÈÀ´½éÉÜÏÂÍøÂçЭÒ飺
    TCP/IP
        Transmission Control Proto ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ