Tag: ICST

  • 在Eclipse中运行pdfbox

    【前言】pdfbox是实验室做文档识别需要了解的开源项目,可是官网doc过于简略,网上资料很多只是调用jar并非在Eclipse中配置运行源代码,仅以此文祭奠我两天的折腾时间……

    0) Environment Specification
    OS:Windows 7
    IDE:Eclipse SDK 3.7.0
    JDK:Version 6 Update 26

    1) This post will not involve the configuration of Java, but you need to confirm JAVA_HOME is in your “Environment Variable” which we will need later on.
    The key should be “JAVA_HOME” and the value is the path of JDK, for me is “D:Program FilesJavajdk1.6.0_26”

    2) Download and extract pdfbox, pdfbox-*.*.*-src.zip, for me is “pdfbox-1.6.0-src.zip” and the extact location is “E:CodeJAVApdfbox-1.6.0”
    http://pdfbox.apache.org/download.html

    3) Download and Extract Maven2, apache-maven-*.*.*-bin.zip, for me is “apache-maven-3.0.3-bin.zip” and the extract location is “D:Program Filesapache-maven-3.0.3”
    http://maven.apache.org/download.html

    4) Configure the “Environment Variable” for Maven2 / Install Maven2
    4.1) Add key “M2_HOME” and the value is path you extact Maven2, for me is “D:Program ilesapache-maven-3.0.3”
    4.2) Add “%M2_HOME%bin” to the key “Path”.
    4.3) Open a new command prompt and run “mvn –version” to verify correct installation.

    5) Install and configure the pdfbox via Maven2
    5.1) Open a new command prompt and change directory to the extract location of pdfbox
    5.2) Run “mvn clean install” to install the pdfbox
    5.3) Run “mvn eclipse:eclipse” to make it a eclipse project.
    5.4) Run “mvn -Declipse.workspace=”PATH OF THE WORKSPACE” eclipse:configure-workspace” to add M2_REPO classpath variable to Eclipse.
    Note : 5.3 & 5.4 is the MOST IMPORTANT part.

    6) Import the project into Eclipse with the root directory of pdfbox (for me is E:CodeJAVApdfbox-1.6.0) then there should be no errors in all the projects.

    7) Edit the “Run Configurations” and enter the command line arguments in the “Arguments” tab and then everything should run correctly.

    Reference:
    1) http://pdfbox.apache.org/userguide/building_pdfbox.html
    2) http://maven.apache.org/download.html#Installation
    3) http://maven.apache.org/guides/getting-started/index.html
    4) http://www.mkyong.com/maven/how-to-configure-m2_repo-variable-in-eclipse-ide/

  • My Life in ICST

    水文一篇,发几张照片,闲杂人等请自行忽略~
    一来避免老爸又抱怨我发的日志他都看不懂
    二来考虑到这里进门都要刷卡,万一滚O了就没机会了~
    不准嘲笑本人冲话费送手机换来的200W像素摄像头,各种模糊请自行忽略
    P.S. ICST 全称 Institution of Computer Science and Technology of Peking University
    (北京大学计算机科学技术研究所)详情见街旁链接


    1、有亮点,自己发现~
    有亮点

    2、节约用扈煊
    节约用扈煊

    3、节约用扈煊——原版
    “节约用扈煊”原版~

    4、Google苹果~
    Google的苹果!

    5、最后来个全景,继续亮点~
    取个全景