
JAVA
apache-bbccb
这个作者很懒,什么都没留下…
展开
-
jxl生成EXCEL
package com.legou.util;import java.awt.Color;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.OutputStream;import java.lang.原创 2012-08-18 16:38:13 · 400 阅读 · 0 评论 -
java使用反射调用set和get方法
public class ReflectionUtils { private static ReflectionUtils instacnce = null; private ReflectionUtils() { } public static ReflectionUtils getInstance() {转载 2014-07-18 07:50:46 · 2567 阅读 · 1 评论 -
RCP中可以取消的进度条
import java.lang.reflect.InvocationTargetException;import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;import java.util.HashMap;import java.util.Map;i原创 2014-07-15 08:18:45 · 651 阅读 · 0 评论 -
导出jar单独运行出现NoClassDefFoundError
在MANIFEST.MF文件中加入Class-Path: xxxx.jar原创 2014-07-29 14:16:29 · 802 阅读 · 0 评论 -
ClassUtil
/* * JBoss, Home of Professional Open Source * Copyright 2006, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full li转载 2014-07-30 15:57:29 · 445 阅读 · 0 评论 -
java SQL语法解释器jsqlparser
SQL 语法解释器jsqlparser 是用java 开发的解析器, 可以生成java类层次结构. 主页地址:http://jsqlparser.sourceforge.net 可以完美解析 表的 增删查改等操作. 展开它的源码你会发现.基本不用看api就可以使用,因为它是如此的类似sql 只要你会转载 2014-07-15 08:20:41 · 2810 阅读 · 0 评论 -
java 根据xpath生成xslt语法文件
package com.zte.util;import java.io.File;import java.io.FileWriter;import java.io.Writer;import java.util.List;import org.dom4j.Document;import org.dom4j.DocumentHelper;import org.dom4j.Element;import转载 2014-09-09 17:04:21 · 1182 阅读 · 0 评论 -
apache项目源码地址
apache所以源码地址http://apache.etoak.com/原创 2013-04-24 17:06:51 · 625 阅读 · 0 评论 -
根据key获取property文件中的值工具类
public class Messages{ private static final String BUNDLE_NAME = "org.jboss.tools.util.messages"; private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); // privat原创 2014-09-10 11:28:31 · 596 阅读 · 0 评论 -
Java将org.w3c.dom.Element对象转换成xml字符串并且不带命名空间
public static String doc2String(org.w3c.dom.Element document) { String s = ""; try { TransformerFactory tFactory = TransformerFactory.newInstance();原创 2014-08-18 11:49:50 · 3858 阅读 · 0 评论 -
java常用框架下载地址
Spring源码下载地址2009-12-28 17:44今天想下载一下Spring的源代码,登录到Spring官网,傻眼了,根本找不到下载的地方!费了九牛二虎之力在网上找到了一个下载地址,记下来,免得下次再次傻找。http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framewo转载 2013-12-16 11:08:40 · 874 阅读 · 0 评论 -
安装FastDFS
目前FastDFS支持类Unix系统 ,在Linux和FreeBSD下测试过,本文使用的是Ubuntu10.4,建议安装之前先简单了解一下FastDFS的原理 ,这对后继的配置部分会有很好的理解。一、准备工作-安装libeventFastDFS 内部绑定了 libevent 作为 http 服务器 ,在V2.X版本必须安装 libevent ,本文安装的是V2.2版本,因此必须安装libe转载 2014-11-12 17:24:50 · 7612 阅读 · 0 评论 -
java动态加载jar,class
package com.test;import java.io.File;import java.lang.reflect.Method;import java.net.URL;import java.net.URLClassLoader;import java.util.List;/** * 根据properties中配置的路径把jar和配置文件加载到classpath中。 *转载 2014-10-28 17:40:17 · 646 阅读 · 0 评论 -
理解Java ClassLoader机制
java.lang.NoClassDefFoundError: com/sun/tools/javac/Main最近在使用java的动态编译的时候出现的问题,主要是由于在使用类com.sun.tool.javac.Main时,总是出现NoClassDefFoundError的错误,后来找到如下的文章,分析,可能是由于对于包tools.jar的加载问题,虽然我在classpath中声明了这个包,转载 2014-10-30 15:35:05 · 359 阅读 · 0 评论 -
RCP程序运行时加载第三方JAR包
问题Java程序所依赖的类库JAR包,可以在开发时的时候添加的classpath中.但有时候,在开发时无法确定所依赖JAR包,或者这些JAR经常改变,这要求程序具有在发布后能动态加载JAR包的功能.一般的Java程序,可以使用URLClassLoader这个类的addURL方法来实现该功能.详细可以参考: http://buliedian.iteye.com/blog/99转载 2014-10-30 16:16:34 · 1106 阅读 · 0 评论 -
HttpClient 学习整理
HttpClient 是我最近想研究的东西,以前想过的一些应用没能有很好的实现,发现这个开源项目之后就有点眉目了,令人头痛的cookie问题还是有办法解决滴。在网上整理了一些东西,写得很好,寄放在这里。HTTP 协议可能是现在 Internet 上使用得最多、最重要的协议了,越来越多的 Java 应用程序需要直接通过 HTTP 协议来访问网络资源。虽然在 JDK 的 java.net 包中转载 2015-03-27 10:48:40 · 342 阅读 · 0 评论 -
java实现屏幕监控
package com.xue.screen;import java.awt.Dimension;import java.awt.Frame;import java.awt.Rectangle;import java.awt.Robot;import java.awt.Toolkit;import java.awt.image.BufferedImage;import javax原创 2015-05-17 19:23:13 · 3426 阅读 · 0 评论 -
修改jsp,servlet文件模板
在myeclipse的安装目录搜索 jsp.vtl原创 2014-03-19 11:31:31 · 487 阅读 · 0 评论 -
Eclipse调试Eclipse源码
http://blog.youkuaiyun.com/dingdong250/article/details/4951741转载 2014-03-14 16:49:27 · 411 阅读 · 0 评论 -
Spring AOP注解配置
package com.zx.aop;import org.aspectj.lang.ProceedingJoinPoint;import org.aspectj.lang.annotation.After;import org.aspectj.lang.annotation.AfterReturning;import org.aspectj.lang.annotation.AfterT原创 2013-12-18 08:46:34 · 526 阅读 · 0 评论 -
tomcat-apache搭建集群和实现负载平衡
搭建集群和实现负载平衡这里有一个配置完好的http://download.youkuaiyun.com/detail/xgskj/5213264,俺自己留着备用的 (一)前期准备我的系统用的是windows7旗舰版,我要做的是,用一个apache和多个(这里以两个作为示例)tomcat,通过jk方式,构造一个集群。以下是要首先准备的东西:1、jdk,我用的版本是jdk1.6 sun官网下载转载 2013-04-01 16:17:05 · 637 阅读 · 0 评论 -
swt树形菜单tree使用
package cn.com.zte.esb.dialog;import java.io.File;import org.eclipse.swt.SWT;import org.eclipse.swt.graphics.Image;import org.eclipse.swt.layout.FillLayout;import org.eclipse.swt.widgets.C原创 2013-04-24 14:58:14 · 3237 阅读 · 0 评论 -
java操作文件工具类
package org.jboss.tools.esb.project.ui.utils;import java.io.BufferedWriter;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;i原创 2013-04-27 09:49:05 · 613 阅读 · 0 评论 -
java压缩文件目录
import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.util.zip.ZipEntry;import java.util.zip.ZipOutputStream;public class UtilsZip { /** *原创 2013-04-27 09:41:51 · 554 阅读 · 0 评论 -
java执行存储过程
Session s = this.getSession(); Connection con = s.connection(); CallableStatement cstm = null; try { cstm = con .prepareCall("{call EVS_GENERATION_NUMBER_PKG.get_generation_number(?原创 2013-05-24 09:09:20 · 548 阅读 · 0 评论 -
java根据条码字符串生成条码图
package com.zte.evs.ebill.common;import java.awt.Color;import java.awt.Graphics;import java.awt.image.BufferedImage;import com.google.zxing.BarcodeFormat;import com.google.zxing.common.B原创 2013-05-11 13:05:02 · 1537 阅读 · 0 评论 -
根据条码编号,返回条码图片
/** * 根据条码编号,返回条码图片 * * @param billCode * 条码编号 * @return BufferedImage */ public static BufferedImage getBarCodeBuffeeredImage(String billCode)原创 2013-05-11 13:13:16 · 699 阅读 · 0 评论 -
人民币小写转成大写
//人民币小写转成大写 //****************************************** public static String numberToChinese(double d) { String prefix = ""; if(d < 0){ d = Math.abs(d); prefix = "原创 2013-05-11 13:12:02 · 660 阅读 · 0 评论 -
java使用poi操作excel
import java.io.File;import java.io.InputStream;import java.lang.reflect.Method;import java.math.BigDecimal;import java.math.BigInteger;import java.util.ArrayList;import java.util.Date;im原创 2013-05-11 13:17:52 · 1103 阅读 · 0 评论 -
java操作json工具类
package com.zte.esb.iesb.directory.utils;import java.util.List;import net.sf.json.JSONArray;import net.sf.json.JSONObject;import com.zte.esb.iesb.directory.model.Directory;import com.z原创 2013-05-27 10:49:02 · 866 阅读 · 0 评论 -
Java中文自动转拼音
package com;import java.util.Scanner;public class ChineseToPinYin { /** * 汉字转拼音缩写 * * @param str * 要转换的汉字字符串 * @return String 拼音缩写 */ public String getPYString(String str)原创 2013-08-05 16:21:29 · 639 阅读 · 0 评论 -
程序员常去的103个网站
程序员常去的103个网站1 J2me开发网 http://www.j2medev.com/bbs/index.asp2 J2me社区 http://www.j2meforums.com/forum/3 csdn http://www.youkuaiyun.com/4 Vc知识库 http://www.vckbase.com/5 codeproject http://www.co转载 2013-08-19 16:00:13 · 657 阅读 · 0 评论 -
java读取properties属性文件值
package com.zte.cbm.bis.business.common;import java.io.File;import java.io.FileInputStream;import java.net.URI;import java.net.URISyntaxException;import java.util.Properties;import com.zte.ssb原创 2013-09-03 09:35:09 · 609 阅读 · 0 评论 -
java对象属性复制
public static void copy(Object source, Object dest) { Method s[] = source.getClass().getMethods(); Method d[] = dest.getClass().getMethods(); try {原创 2013-10-14 12:24:44 · 463 阅读 · 0 评论 -
java快速排序法
public static int[] quit(int arr[],int left,int right){ int t; if(left<right){ int s=arr[left]; int i=left; int j=right+1; while(true){ //从左left位置向右right位置找小于s的索引 while(i<arr.l原创 2013-11-01 16:40:41 · 413 阅读 · 0 评论 -
java实现链表
public class Link{ class Node{ String value; Node next; public Node(String v){ this.value=v; } public void addNode(Node n){ if(this.next==null) this.next=n; else this.next.原创 2013-11-20 09:54:43 · 688 阅读 · 0 评论 -
java线程排队执行
package htr;import java.util.concurrent.atomic.AtomicInteger;import java.util.concurrent.locks.Condition;import java.util.concurrent.locks.Lock;import java.util.concurrent.locks.ReentrantLock;p原创 2013-11-21 17:56:27 · 2699 阅读 · 0 评论 -
集合数据分批处理
List list=Arrays.asList(new String[]{"1","1"},new String[]{"2","1"},new String[]{"3","1"}, new String[]{"4","1"},new String[]{"5","1"},new String[]{"6","1"},new String[]{"7","1"}); int totalC原创 2015-07-30 16:08:13 · 1549 阅读 · 0 评论