JavaÎļþ²Ù×÷´óÈ«£¨°Ë£©
49.Îı¾²éÕÒÌæ»»
//import java.nio.*;
String s1=%%1;
String s2=%%2;
String s3=%%3;
int pos=%%4;
/*±äÁ¿iºÍj·Ö±ð±íʾÖ÷´®ºÍģʽ´®Öе±Ç°×Ö·û´®µÄλÖã¬k±íʾƥÅä´ÎÊý*/
int i,j,k=0;
i = pos;
j = 0;
//½«s1ת»¯³ÉStringBufferÐͽøÐвÙ×÷
repStr = new StringBuffer(s1);
while(i<repStr.length()&&j<s2.length())
{
if(repStr.charAt(i) == s2.charAt(j))
{
++i; ++j;
if(j==s2.length())
{
/*j=s2.length()±íʾ×Ö·û´®Æ¥Åä³É¹¦£¬Æ¥Åä´ÎÊý¼Ó1£¬´ËÍâ¶ÔÖ÷´®½øÐÐ×Ö·û´®Ìæ»»*/
k = k+1;
repStr.replace(i-j,i,s3);
//½«j½øÐÐÖØи³Öµ¿ªÊ¼ÐµıȽÏ
j = 0;
}
}
else {i = i-j+1; j = 0;}
}
return k;
50.Îļþ¹ØÁª
//import java.io.*;
try {
Runtime.getRuntime().exec(%%1); //"assoc .txt =mynote" "assoc [.ext[=[filetype]]]"
} catch (IOException e) {
e.printStackTrace();
}
52.ÉèÖÃJDK»·¾³±äÁ¿
@echo off
IF EXIST %1\bin\java.exe (
rem ÈçÊäÈëÕýÈ·µÄ Java2SDK °²×°Ä¿Â¼£¬¿ªÊ¼ÉèÖû·¾³±äÁ¿
@setx JAVA_HOME %1
@setx path %path%;%JAVA_HOME%\bin
@setx classpath %classpath%;.
@setx classpath %classpath%;%JAVA_HOME%\lib\tools.jar
@setx classpath %classpath%;%JAVA_HOME%\lib\dt.jar
@setx classpath %classpath%;%JAVA_HOME%\jre\lib\rt.jar
@echo on
@echo Java 2 SDK »·¾³²ÎÊýÉèÖÃÍê±Ï£¬Õý³£Í˳ö¡£
) ELSE (
IF "%1"=="" (
rem ÈçûÓÐÌṩ°²×°Ä¿Â¼£¬Ìáʾ֮ºóÍ˳ö
@echo on
@echo ûÓÐÌṩ Java2SDK µÄ°²×°Ä¿Â¼,²»×öÈκÎÉèÖã¬ÏÖÔÚÍ˳ö»·¾³±äÁ¿ÉèÖá£
) ELSE
Ïà¹ØÎĵµ£º
Ctrl+1 ¿ìËÙÐÞ¸´(×î¾µäµÄ¿ì½Ý¼ü,¾Í²»Óöà˵ÁË)
Ctrl+D: ɾ³ýµ±Ç°ÐÐ
Ctrl+Alt+↓ ¸´ÖƵ±Ç°Ðе½ÏÂÒ»ÐÐ(¸´ÖÆÔö¼Ó)
Ctrl+Alt+↑ ¸´ÖƵ±Ç°Ðе½ÉÏÒ»ÐÐ(¸´ÖÆÔö¼Ó)
Alt+↓ µ±Ç°ÐкÍÏÂÃæÒ»Ðн»»¥Î»ÖÃ(ÌرðʵÓÃ,¿ÉÒÔÊ¡È¥ÏȼôÇÐ,ÔÙÕ³ÌùÁË)
Alt+↑ µ±Ç°ÐкÍÉÏÃæÒ»Ðн»»¥Î»ÖÃ(ͬÉÏ)
Alt+← Ç°Ò»¸ö±à¼µ ......
Mediator ģʽµÄÄ¿µÄÊǶ¨ÒåÒ»¸ö¶ÔÏó,·â×°Ò»×é¶ÔÏó¼äµÄ½»»¥,ÕâÑù¾Í½µµÍÁ˽»»¥¶ÔÏó¼äµÄñîºÏ,ʹ¶ÔÏóºÍËûÃDzο¼µÄ¶ÔÏóÏÔʾµØ·ÖÀë,¾Í¿ÉÒÔ¶ÀÁ¢µØ±ä»¯ËûÃÇÖ®¼äµÄ¹Øϵ.
Ìõ¼þ:¶ÔÏó¼äµÄ½»»¥ºÍ¶ÔÏóµÄÆäËûÐÐΪ±È½Ï¶ÀÁ¢.
  ......
1.´´½¨Îļþ¼Ð
//import java.io.*;
File myFolderPath = new File(%%1);
try {
if (!myFolderPath.exists()) {
myFolderPath.mkdir();
}
}
catch (Exception e) {
System.out.println("н¨Ä¿Â¼²Ù×÷³ö´í");
e.printStackTra ......
39.дÈëXMLÊý¾Ý¿â
//import java.io.*;
//import javax.xml.parsers.*;
//import org.xml.sax.*;
//import org.w3c.dom.*;
//import javax.xml.transform.*;
//import javax.xml.transform.dom.*;
//import javax.xml.transform.stream.*;
private Document ......