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
阅读全文
摘要:importjava.util.concurrent.CountDownLatch;publicclassLatchDriverDemo{privatestaticfinalintN=5;publicstaticvoidmain(String[]args)throwsInterruptedException{//用于向工作线程发送启动信号CountDownLatchstartSignal=newCountDownLatch(1);//用于等待工作线程的结束信号CountDownLatchCountDownLatchdoneSignal=newCountDownLatch(N);for(inti
阅读全文
摘要:/** * ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, * long keepAliveTime, TimeUnit unit, * BlockingQueue<Runnable> workQueue, * RejectedExecutionHandler handler) * corePoolSize: 线程池维护线程的最少数量 * maximumPoolSize:线程池维护线程的最大数量 * keepAliveTime: 线程池维护线程所允许的空闲时间 * unit: 线程池维护线程所允...
阅读全文