Java/JSP
xqdak
这个作者很懒,什么都没留下…
展开
-
Java 获得MAC地址
import java.io.*;public class GetMac{ //通过IP获取网卡地址 public String getMacByIP(String serverIP) { String str = ""; String macAddress = ""; try { Process pp = Runtime.getRuntime().exec("nbt转载 2006-02-23 13:09:00 · 1194 阅读 · 0 评论 -
Java 获取MAC地址2
class getMac{ public String getMacByIPConfig() { String str = ""; String macAddress = ""; try { Process pp = Runtime.getRuntime().exec("ipconfig /all "); InputStreamReader ir = new InputStream原创 2006-02-23 14:34:00 · 964 阅读 · 0 评论 -
字符窜转换
class StringTransform{ StringTransform() { } public static void println(String ResStr) { System.out.println(ResStr); } //字符窜左移操作 public static String leftShift(String ResStr,int n) { String str原创 2006-03-01 13:12:00 · 813 阅读 · 0 评论 -
在web.xml中引入其他xml文件
]>http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> &mytest;原创 2009-05-25 16:04:00 · 2160 阅读 · 2 评论 -
How to perform AD(MS Active Directory) Authentication using JNDI from Java?
import java.util.Hashtable;import javax.naming.Context;import javax.naming.NamingException;import javax.naming.ldap.InitialLdapContext;import javax.naming.ldap.LdapContext; Hashtable env = new Has转载 2009-06-09 14:42:00 · 573 阅读 · 0 评论 -
JAVA 的MD5加密算法源代码
import java.security.MessageDigest;public class RMD5 { public RMD5(){ } public final static String MD5(String strOriginal){ char[] cHexDigits = {0,1,2,3,4,5,6,7,8,9,a,b,c转载 2009-06-12 16:48:00 · 711 阅读 · 0 评论