05 2013 档案

摘要:jacob 操作 wordpublicbooleandoc2pdf(StringsrcFilePath,StringpdfFilePath){ActiveXComponentapp=null;Dispatchdoc=null;try{ComThread.InitSTA();app=newActiveXComponent("Word.Application");app.setProperty("Visible",false);Dispatchdocs=app.getProperty("Documents").toDispatch();d 阅读全文
posted @ 2013-05-24 16:07 郑小明 阅读(12679) 评论(0) 推荐(1) 编辑
摘要:importjava.util.concurrent.CountDownLatch;publicclassLatchDriverDemo{privatestaticfinalintN=5;publicstaticvoidmain(String[]args)throwsInterruptedException{//用于向工作线程发送启动信号CountDownLatchstartSignal=newCountDownLatch(1);//用于等待工作线程的结束信号CountDownLatchCountDownLatchdoneSignal=newCountDownLatch(N);for(inti 阅读全文
posted @ 2013-05-24 16:03 郑小明 阅读(283) 评论(0) 推荐(0) 编辑
摘要:/** * ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, * long keepAliveTime, TimeUnit unit, * BlockingQueue<Runnable> workQueue, * RejectedExecutionHandler handler) * corePoolSize: 线程池维护线程的最少数量 * maximumPoolSize:线程池维护线程的最大数量 * keepAliveTime: 线程池维护线程所允许的空闲时间 * unit: 线程池维护线程所允... 阅读全文
posted @ 2013-05-24 16:02 郑小明 阅读(268) 评论(0) 推荐(0) 编辑