1·ÖÖÓJava³ÌÐò¿ìËÙת»»Îªwindows·þÎñÔËÐÐ
ÎÄÕÂÀ´Ô´£ºhttp://www.blogjava.net/midea0978/archive/2008/01/17/175953.html
1¡¢Ê×Ïȵ½ÇëÏÂÔØ×îа汾µÄJava Service Wrapper£¬µãÎÒÏÂÔØ¡£
2¡¢×¼±¸ÈçÏÂÎļþ£¬¸´ÖƵ½testĿ¼£¬ÕâЩÎļþ¿ÉÒÔ´ÓÏÂÔØ°üÖÐÕÒµ½£º
wrapper.dll
wrapper.exe
wrapper.jar
3¡¢±àдwrapper.conf£¬Ò²·ÅÔÚͬһ¼¶Ä¿Â¼ÏÂÃ棬ÄÚÈÝÈçÏÂ
# Java ApplicationÍêÕû·¾¶
wrapper.java.command=java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
#¶¨Òå³ÌÐòÔËÐеÄclasspath
wrapper.java.classpath.1=wrapper.jar
wrapper.java.classpath.2=[jar file/path]
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=.
# Java Additional Parameters
#wrapper.java.additional.1=
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
# ÔËÐеÄMain Class
wrapper.app.parameter.1=
wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=Beanskt.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=0
wrapper.logfile.maxfiles=0
wrapper.syslog.loglevel=NONE
#window·þÎñÅäÖÃ
wrapper.console.title=samplesvr
#·þÎñÃû
wrapper.ntservice.name=samplesvr
# ÏÔʾÃû³Æ
wrapper.ntservice.displayname= sample Service
# ÃèÊö
wrapper.ntservice.description=sample Service
# ÒÀÀµÏî
wrapper.ntservice.dependency.1=
# Æô¶¯Ä£Ê½£º AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# ÊÇ·ñ½»»¥.
wrapper.ntservice.interactive=false
4¡¢ÔËÐвâÊÔ£¬°²×°·þÎñ
¡·²âÊÔÔËÐÐÊÇ·ñÕý³£
wrapper.exe -c wrapper.conf
¡·°²×°·þÎñ
wrapper.exe -i wrapper.conf
¡·Ð¶ÔØ·þÎñ
wrapper.exe -r wrapper.conf
¡·Æô¶¯
wrapper.exe -t wrapper.conf
¡·Í£Ö¹
wrapper.exe -p wrapper.conf
Ïà¹ØÎĵµ£º
±³¾°¼ò½é£ºKMPËã·¨ÓÃÀ´´¦Àí×Ö·û´®Æ¥ÅäµÄ¡£¸øÄãA,BÁ½¸ö×Ö·û´®£¬¼ì²éB´®ÊÇ·ñÊÇA´®µÄ×Ó´®£¬ÀàËÆÓÚJavaµÄString.indexOf("")¡£Ö®ËùÒÔ½Ð×öKMP£¬ÊÇÒòΪÕâ¸öËã·¨ÊÇÓÉKnuth¡¢Morris¡¢PrattÈý¸öÌá³öÀ´µÄ£¬È¡ÁËÕâÈý¸öÈ˵ÄÃû×ÖµÄÍ·Ò»¸ö×Öĸ¡£
ÔÀí½éÉÜ£ºÕÒµ½Æ¥Åäʧ°ÜʱµÄ×îºÏÊʵĻØÍËλÖ㬶ø²»ÊǼòµ¥µÄ»ØÍ˵½×Ó´®µÄµÚÒ»¸ö×Ö·û£¨³£¹ ......
JAVA³ÌÐòÔ±ÃæÊÔ32ÎÊ
µÚÒ»£¬Ì¸Ì¸final, finally, finalizeµÄÇø±ð¡£
final ÐÞÊηû£¨¹Ø¼ü×Ö£©Èç¹ûÒ»¸öÀà±»ÉùÃ÷Ϊfinal£¬Òâζ×ÅËü²»ÄÜÔÙÅÉÉú³öеÄ×ÓÀ࣬²»ÄÜ×÷Ϊ¸¸Àà±»¼Ì³Ð¡£Òò´ËÒ»¸öÀ಻Äܼȱ»ÉùÃ÷Ϊ abstractµÄ£¬ÓÖ±»ÉùÃ÷ΪfinalµÄ¡£½«±äÁ¿»ò·½·¨ÉùÃ÷Ϊfinal£¬¿ÉÒÔ±£Ö¤ËüÃÇÔÚʹÓÃÖв»±»¸Ä±ä¡£±»ÉùÃ÷ΪfinalµÄ±äÁ¿±ØÐëÔÚÉù ......
public class DealLockTest implements Runnable {
static String i = new String();
static String j = new String();
private String str = null;
public DealLockTest(String str) {
this.str = str;
}
public static void main(String[] args) {
new Thread(new DealLockTest("i")).start( ......
ʹÓà java ½øÐÐÎļþ¿½±´ ÏàÐźܶàÈ˶¼»áÓÃ,,²»¹ýЧÂÊÉÏÊÇ·ñ×îºÃÄØ?
×î½ü¿´ÁË¿´NIO¾ö¶¨ÊÔÒ»ÊÔ java NIO µ½µ×ÓÐʲôÐÔÄܵÄÌáÉý.
µÚÒ»ÖÖ·½·¨:¹ÅÀϵķ½Ê½
public static long forJava(File f1,File f2) throws Exception{
long time=new Date().getTime();
int length=2097152;
FileInp ......
ÓÃInstallAnywhere´ò°üJava³ÌÐò°üº¬MySQLÊý¾Ý¿â
InstallAnywhere´ò°üJava³ÌÐòʱ¿ÉÒÔ×Ô¶¯Íê³ÉjreµÄ´ò°ü£¬µ«ÊÇÐèÒªMySQLÊý¾Ý¿âµÄ³ÌÐò¾ÍµÃÊÖ¶¯Ìí¼Ó¡£×ÊÁÏÌ«ÉÙ£¬¾À½áÁËÈýÌ죬ÖÕÓÚ½â¾ö
1¡¢ ÏÂÔØÂÌÉ«°æµÄMySQL£¬¿ÉÒÔÈ¥¹ÙÍøÏÂÔØ¡£ÍøÓÑÖÆ×÷ÁËMySQLµÄÂÌÉ«¾«¼òBat°æ£¨http://download.csdn.net/source/524812 ......