Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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³ÌÐò×ö³ÉexeÎļþµÄ¼¸ÖÖ×ö·¨£¨ZT£©

 ¿ÉÒÔ°ÑÆÕͨµÄJava³ÌÐò×ö³ÉÕæÕýµÄexe,Ò²¾ÍÊǵ¥Ò»¸öexe¾Í¿ÉÒÔÔÚûÓа²×°JVMµÄ»úÆ÷ÉÏÔËÐС£ÕâÑùµÄ¹¤¾ß³£¼ûµÄÓÐJETºÍgcj.ǰÕßÊÇÊշѵ쬶øÇÒ×ö³öÀ´µÄexe»¹ÊÇÐèÒªÒ»¶Ñdll¡£ÍƼöʹÓÃgcj.ËûÓÐwindowsºÍLinux°æ£¬Ö±½ÓÏÂÔØzip°ü£¬²»ÐèÒª°²×°£¬ÀïÃæÓв»ÉÙÀý×Ó£¬Ò»Ð©buildµÄÅú´¦ÀíÎļþ¡£´ÓÔ­ÀíÀ´Ëµgcj×Ô¼ºÊµÏÖÁËJVM¹æ·¶£¬Ò²¾ÍÊÇÄ ......

java Áгöì³²¨ÄÇÆõÊýÁеÄǰnÏî

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 ......

JavaÅàѵ×ܽá

1¡¢  Web.xml
1£©  ÅäÖÃhibernate
<context-param>
       <param-name>contextConfigLocation</param-name>
       <param-value>/WEB-INF/dbConnectionContext.xml /WEB-INF/serviceContext.xml</param-value> ......

javaÖÐsynchronizedÓ÷¨

synchronizedµÄÒ»¸ö¼òµ¥Àý×Ó
public class TextThread
{
 /**
  * @param args
  */
 public static void main(String[] args)
 {
  // TODO ×Ô¶¯Éú³É·½·¨´æ¸ù
        TxtThread tt = new TxtThread();
      ......

Java Àà×°ÈëÆ÷Ô­Àí

 
×ªÔØ×Ôhttp://blog.csdn.net/yuekun1172006/archive/2007/06/02/1634878.aspx
Àà×°ÈëÆ÷ÊÇ JVM ÓÃÀ´×°ÈëÀàµÄÀ࣬Ëü¶ÔÓÚ Java ±à³ÌÊǷdz£ÖØÒªµÄÒ»¸ö¸ÅÄî¡£Ò»°ãÇé¿öÏ£¬³ÌÐòÔ±ÔÚ±àд³ÌÐòµÄʱºò¶¼¿ÉÒÔºöÂÔÀà×°ÈëÆ÷µÄ´æÔÚÐÔ¡£µ«ÊǶÔÓÚ·þÎñÆ÷¶Ë±à³Ì»òÕßÊÇÒ»Ð©ÌØÊâÇé¿öÏÂʱºò£¬ÉîÈëÁ˽âÀà×°ÈëÆ÷µÄ»úÖÆÒÔ¼°ÆäÔÚ²»Í¬Çé¿öϵ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ