Java½â»ó2 20ÎÒµÄÀàÊÇʲôI
ÏÂÃæµÄ³ÌÐò±»Éè¼ÆÓÃÀ´´òÓ¡ËüµÄÀàÎļþµÄÃû³Æ¡£Èç¹ûÄã²»ÊìϤÀà×ÖÃæ³£Á¿£¬ÄÇôÎÒ¸æËßÄãMe.class.getName()½«·µ»ØMeÀàÍêÕûµÄÃû³Æ£¬¼´“com.javapuzzlers.Me”¡£ÄÇô£¬Õâ¸ö³ÌÐò»á´òÓ¡³öʲôÄØ£¿
package com.javapuzzlers;
public class Me {
public static void main(String[] args){
System.out.println(
Me.class.getName().
replaceAll(".","/") + ".class");
}
}
¸Ã³ÌÐò¿´ÆðÀ´»á»ñµÃËüµÄÀàÃû£¨“com.javapuzzlers.Me”£©£¬È»ºóÓÓ/”Ìæ»»µôËùÓгöÏÖµÄ×Ö·û´®“.”£¬²¢ÔÚĩβ׷¼Ó×Ö·û´®“.class”¡£Äã¿ÉÄÜ»áÈÏΪ¸Ã³ÌÐò½«´òÓ¡com/javapuzzlers/Me.class£¬¸Ã³ÌÐòÕýʽ´ÓÕâ¸öÀàÎļþÖб»¼ÓÔصġ£Èç¹ûÄãÔËÐÐÕâ¸ö³ÌÐò£¬¾Í»á·¢ÏÖËüʵ¼ÊÉÏ´òÓ¡µÄÊÇ///////////////////.class¡£µ½µ×Ôõô»ØÊ£¿ÄѵÀÎÒÃÇÊÇб¸ÜµÄÊܺ¦ÕßÂð£¿
ÎÊÌâÔÚÓÚString.replaceAll½ÓÊÜÁËÒ»¸öÕýÔò±í´ïʽ×÷ΪËüµÄµÚÒ»¸ö²ÎÊý£¬¶ø²¢·Ç½ÓÊÜÁËÒ»¸ö×Ö·ûÐòÁÐ×ÖÃæ³£Á¿¡££¨ÕýÔò±í´ïʽÒѾ±»Ìí¼Óµ½ÁËJavaƽ̨µÄ1.4°æ±¾ÖС££©ÕýÔò±í´ïʽ“.”¿ÉÒÔÆ¥ÅäÈκε¥¸öµÄ×Ö·û£¬Òò´Ë£¬ÀàÃûÖеÄÿһ¸ö×Ö·û¶¼±»Ìæ»»³ÉÁËÒ»¸öб¸Ü£¬½ø¶ø²úÉúÁËÎÒÃÇ¿´µ½µÄÊä³ö¡£
ÒªÏëֻƥÅä¾äµã·ûºÅ£¬ÔÚÕýÔò±í´ïʽÖеľäµã±ØÐëÔÚÆäÇ°ÃæÌí¼ÓÒ»¸ö·´Ð±¸Ü£¨\£©½øÐÐתÒå¡£ÒòΪ·´Ð±¸Ü×Ö·ûÔÚ×ÖÃ溬ÒåµÄ×Ö·û´®ÖоßÓÐÌØÊâµÄº¬Òå——Ëü±êʶתÒå×Ö·ûÐòÁеĿªÊ¼——Òò´Ë·´Ð±¸Ü×ÔÉí±ØÐëÓÃÁíÒ»¸ö·´Ð±¸ÜÀ´×ªÒ壬ÕâÑù¾Í¿ÉÒÔ²úÉúÒ»¸öתÒå×Ö·ûÐòÁУ¬Ëü¿ÉÒÔÔÚ×ÖÃ溬ÒåµÄ×Ö·û´®ÖÐÉú³ÉÒ»¸ö·´Ð±¸Ü¡£°ÑÕâЩºÏÔÚÒ»Æ𣬾ͿÉÒÔʹÏÂÃæµÄ³ÌÐò´òÓ¡³öÎÒÃÇËùÆÚÍûµÄcom/javapuzzlers/Me.class£º
package com.javapuzzlers;
public class Me {
public static void main(String[] args){
System.out.println(
Me.class.getName().replaceAll("\\.","/") + ".class");
}
}
ΪÁ˽â¾öÕâÀàÎÊÌ⣬5.0°æ±¾ÌṩÁËеľ²Ì¬·½·¨java.util.regex.Pattern.quote¡£Ëü½ÓÊÜÒ»¸ö×Ö·û´®×÷Ϊ²ÎÊý£¬²¢¿ÉÒÔÌí¼Ó±ØÐèµÄתÒå×Ö·û£¬Ëü½«·µ»ØÒ»¸öÕýÔò±í´ïʽ×Ö·û´®£¬¸Ã×Ö·û´®½«¾«È·Æ¥ÅäÊäÈëµÄ×Ö·û´®¡£ÏÂÃæÊÇʹÓø÷½·¨Ö®ºóµÄ³ÌÐò£º
package com.javapuzzlers;
import java.util.regex.Pattern;
public class Me {
public static void main(String[] args){
System.out.println(Me.class.getName()
Ïà¹ØÎĵµ£º
2008 Äê 6 ÔÂ 24 ÈÕ
ÔÎĵØÖ·£º http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0806wangys/
±¾ÎĽéÉÜ IBM FileNet P8 4.0 Platform ÌṩµÄ Content Java API¡£Ê×ÏÈ¶Ô FileNet P8 Content Engine ºÍ API ½øÐиÅÒª½éÉÜ, ²¢ËµÃ÷ÁËһЩ»ù±¾¸ÅÄËæºóÏêϸ½éÉÜÁË FileNet Content EngineÌṩµÄ»ùÓÚ EJB ......
µÚÒ»Õ ¸ÅÊö
°æȨÉùÃ÷
´ËÎĵµÓÉÍõ½¡Ðñ(http://www.wangjianxu.com ginger547@gmail.com )¸ºÔðÕûÀí×ܽᣬ²¢¶Ô¸ÃÎĵµ±£ÓÐÓÐÏÞÔðÈÎȨÀû£¬´ËÎĵµÖ»ÄÜÓÃÓÚѧϰÒÔ¼°½Ìѧ£¬ÇëÎðÓÃ×÷ÉÌÒµÓÃ;£¬Òò´Ë¶ø
²úÉúµÄ·¨ÂÉÎÊÌ⣬±¾ÈËÒ»¸Å²»¸ºÔð¡£ ±¾ ......
±¾ÎÄ´Óhttp://www.blogjava.net/breezedancer/archive/2007/07/19/131264.htmlתÔØ
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
//¶ÏµãÐø´ ......
ÓÃspyºÍmemcached for javaÁ½ÖÖ·½Ê½¶Ômemcache½øÐвÙ×÷
Ò»¡¢spy
package com.test.memcache;
import java.net.InetSocketAddress;
import java.util.concurrent.Future;
import net.spy.memcached.MemcachedClient;
/**
* ±¾ÀàÓõİüÊÇmemcached-2.4.1.jar
* ÏÂÔصØÖ·£º http://code.googl ......
javaÖо²Ì¬±äÁ¿ºÍ¾²Ì¬·½·¨·Ö±ðÓÐʲôÌص㣿
ÐüÉÍ·Ö£º0 - ½â¾öʱ¼ä£º2006-4-10 10:28
ÌáÎÊÕߣº vv_clear - ¶þ¼¶
×î¼Ñ´ð°¸
ΪʲôÎÊÁËÁ½´Î£¿ÔÙÌùÉÏÁíһƪ
Thinking:JavaÖÐstaticÓ÷¨- -
Tag£º Thinking:JavaÖÐs
Ò»¡¢static
ÇëÏÈ¿´ÏÂÃæÕâ¶Î³ÌÐò£º
public class ......