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 String getWindir(){
return System.getenv("windir");
}
/**
* Get file separator, such as "/" on unix.
*
* @return the separator of file.
*/
public static String getFileSeparator()
{
return System.getProperty("file.separator");
}
/**
* Get line separator, such as "\n" on unix.
*
* @return the separator of line.
*/
public static String getLineSeparator()
{
return System.getProperty("line.separator");
}
/**
* Get programPath
*
* @return programPath
*/
public static String getProgramPath()
{
Class<PathUtil> cls = PathUtil.class;
ClassLoader loader = cls.getClassLoader();
//
// Get the full name of the class.
//
String clsName = cls.getName() + ".class";
//
// Get the package that include the class.
//
Package pack = cls.getPackage();
String path = "";
//
// Transform package name to path.
//
if(pack != null)
{
String packName = pack.getName();
//
// Get the class's file name.
//
clsName = clsName.substring(packName.length() + 1);
//
// If package is simple transform package name to path directly,
// else transform package name to path by package name's
// constituent.
//
path = packName;
if(path.ind
Ïà¹ØÎĵµ£º
Java
鍼뱎˜
MC
ËùÓÐ
ITEM
1
¡¢
mc
±éÀú
item
ÔÀí
Mc
±éÀú
item
Óõ½µÄÃüÁîÓÐÈý¸ö£º
stats items
£¬
stats cachedump, get
¡£Í¨¹ý
telnet
³ÌÐò
telnet
µ½
mc
·þÎñÆ÷ÉÏ£¨
telnet ip
µØÖ·
¶Ë¿ÚºÅ£¬Èç
telnet 192.168.0.1 11211
£©£¬ÒÀ´ÎÖ ......
public class Fibonacci {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
NumOfFibonacci(9);
}
public static int MyFibonacci(int i){
if(i>0) {
if(i == 1)return 1;
if(i == 2)return 1;
else return MyFibonacc ......
ÏÖÔÚ£¬Ì¸ÔƼÆËãµÄ¿É¶àÁË£¬²»¹ý£¬Ò»°ã±È½Ï¹Ø×¢µÄÊÇGoogleºÍAmazonµÄÔÆ·þÎñ¡£´Ó´ó·¶Î§À´¿´£¬Ò²Ö»ÓÐÕâÁ½¼Ò»ñµÃÁ˹«Öڵĸü¶à¹Ø×¢¡£±ÈÈ磬ÎÒ¸öÈ˺ܸÐÐËȤµÄ£¬¾ÍÊÇGoogleµÄApp EngineʹÓû§Äܹ»ÔÚGoogle»ù´¡ÉèÊ©ÉϹ¹½¨ºÍÍÐ¹Ü Web Ó¦ÓóÌÐò¡£ÖÁÓÚAmazon£¬ËüµÄAmazonWeb Services»¹°üÀ¨Elastic Cloud Compute (EC2)¼ÆËãWeb·þ ......
תÔØ×Ôhttp://blog.csdn.net/yuekun1172006/archive/2007/06/02/1634878.aspx
Àà×°ÈëÆ÷ÊÇ JVM ÓÃÀ´×°ÈëÀàµÄÀ࣬Ëü¶ÔÓÚ Java ±à³ÌÊǷdz£ÖØÒªµÄÒ»¸ö¸ÅÄî¡£Ò»°ãÇé¿öÏ£¬³ÌÐòÔ±ÔÚ±àд³ÌÐòµÄʱºò¶¼¿ÉÒÔºöÂÔÀà×°ÈëÆ÷µÄ´æÔÚÐÔ¡£µ«ÊǶÔÓÚ·þÎñÆ÷¶Ë±à³Ì»òÕßÊÇһЩÌØÊâÇé¿öÏÂʱºò£¬ÉîÈëÁ˽âÀà×°ÈëÆ÷µÄ»úÖÆÒÔ¼°ÆäÔÚ²»Í¬Çé¿öϵ ......