java
文章平均质量分 76
yanbffnst
这个作者很懒,什么都没留下…
展开
-
利用java Api解析XML
import java.io.IOException;import java.io.StringReader;import java.util.ArrayList;import java.util.List;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;impor原创 2009-11-12 16:10:00 · 585 阅读 · 0 评论 -
java获取程序当前目录。
import java.net.URL;import java.net.URLDecoder;public class PathUtil{ /** * Get the env of windir, such as "C:/WINDOWS". * @return the env of windir value. */ public static Stri原创 2009-11-12 16:04:00 · 1633 阅读 · 0 评论 -
java.library.path属性在代码中设置不生效问题(转)
java.library.path属性在代码中设置不生效问题 - [Java Swing]版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明http://daimojingdeyu.blogbus.com/logs/28617218.html前两天想的屏幕抓图的程序,想给加个系统全局的热键,也就是说,在程序不处于当前激活下也可响应键盘事件。通过java自己应该是实现不了转载 2009-11-12 14:36:00 · 5900 阅读 · 5 评论 -
利用Java API对字符串进行加密解密(DES加密算法)
/*Decryptor*/import javax.crypto.Cipher;import javax.crypto.SecretKey;import javax.crypto.SecretKeyFactory;import javax.crypto.spec.DESKeySpec;/** * Decrypt the password get form Xpress GUI */publi原创 2009-11-12 16:15:00 · 1970 阅读 · 0 评论 -
用java API 的Logger记log(java.util.logging.Logger)
Since 1.4, a logging functionnality is included with the JDK. Its the java.util.logging package. import java.util.logging.*;import java.io.*;public class TestLog {public static Logger l转载 2009-12-03 14:51:00 · 3894 阅读 · 0 评论 -
Eclipse RCP Console View 相关操作
一、在RCP 程序中加入Console View 在RCP 程序中加入Console View 的方法如下:方法一:1.在plugin.xml的Dependencies页中为Required Plug-ins增加org.eclipse.ui.console。2.写一个ConsoleFactory类实现IConsoleFactory,代码如下:package com.fujits原创 2009-12-18 10:22:00 · 4869 阅读 · 3 评论 -
Eclipse RCP 程序获取程序路径
一、Rcp程序获取程序安装路径String path = null;Location location = Platform.getInstallLocation();if (location != null) { URL url = location.getURL(); path = url.getPath();} 二、获取Plug-in中的资源的绝对路径i原创 2009-12-18 11:16:00 · 3224 阅读 · 1 评论 -
定制Eclipse视图Tab的右键系统菜单
定制Eclipse视图Tab的右键系统菜单(或者屏蔽Tab上的系统右键菜单)介绍: 1.在ApplicationWorkbenchWindowAdvisor类的preWindowOpen()方法中为 IWorkbenchWindowConfigurer添加一个自定义WorkbenchPresentationFactory工厂类; 2.在自定义WorkbenchPresentationFactory转载 2009-12-24 15:08:00 · 1774 阅读 · 0 评论