ÉîÈëdz³öJava¶àÏ̳߳ÌÐòÉè¼Æ
Ò»£ºÀí½âJava¶àÏß³Ì
¶àÏß³ÌÊÇÕâÑùÒ»ÖÖ»úÖÆ£¬ËüÔÊÐíÔÚ³ÌÐòÖв¢·¢Ö´Ðжà¸öÖ¸ÁîÁ÷£¬Ã¿¸öÖ¸ÁîÁ÷¶¼³ÆΪһ¸öỊ̈߳¬±Ë´Ë¼ä»¥Ïà¶ÀÁ¢¡£Ïß³ÌÓÖ³ÆΪÇáÁ¿¼¶½ø³Ì£¬ËüºÍ½ø³ÌÒ»ÑùÓµÓжÀÁ¢µÄÖ´ÐпØÖÆ£¬ÓɲÙ×÷ϵͳ¸ºÔðµ÷¶È£¬Çø±ðÔÚÓÚÏß³ÌûÓжÀÁ¢µÄ´æ´¢¿Õ¼ä£¬¶øÊǺÍËùÊô½ø³ÌÖеÄÆäËüÏ̹߳²ÏíÒ»¸ö´æ´¢¿Õ¼ä£¬ÕâʹµÃÏ̼߳äµÄͨÐÅÔ¶½Ï½ø³Ì¼òµ¥¡£
¶à¸öÏ̵߳ÄÖ´ÐÐÊDz¢·¢µÄ£¬Ò²¾ÍÊÇÔÚÂß¼Éϓͬʱ”£¬¶ø²»¹ÜÊÇ·ñÊÇÎïÀíÉϵēͬʱ”¡£Èç¹ûϵͳֻÓÐÒ»¸öCPU£¬ÄÇôÕæÕýµÄ“ͬʱ”ÊDz»¿ÉÄܵģ¬µ«ÊÇÓÉÓÚCPUµÄËٶȷdz£¿ì£¬Óû§¸Ð¾õ²»µ½ÆäÖеÄÇø±ð£¬Òò´ËÎÒÃÇÒ²²»ÓùØÐÄËü£¬Ö»ÐèÒªÉèÏë¸÷¸öÏß³ÌÊÇͬʱִÐм´¿É¡£
¶àÏ̺߳ʹ«Í³µÄµ¥Ïß³ÌÔÚ³ÌÐòÉè¼ÆÉÏ×î´óµÄÇø±ðÔÚÓÚ£¬ÓÉÓÚ¸÷¸öÏ̵߳ĿØÖÆÁ÷±Ë´Ë¶ÀÁ¢£¬Ê¹µÃ¸÷¸öÏß³ÌÖ®¼äµÄ´úÂëÊÇÂÒÐòÖ´Ðеģ¬ÓÉ´Ë´øÀ´µÄÏ̵߳÷¶È£¬Í¬²½µÈÎÊÌ⣬½«ÔÚÒÔºó̽ÌÖ¡£
¶þ£ºÊµÏÖJava¶àÏß³Ì
ÎÒÃDz»·ÁÉèÏ룬ΪÁË´´½¨Ò»¸öеÄỊ̈߳¬ÎÒÃÇÐèÒª×öЩʲô£¿ºÜÏÔÈ»£¬ÎÒÃDZØÐëÖ¸Ã÷Õâ¸öÏß³ÌËùÒªÖ´ÐеĴúÂ룬¶øÕâ¾ÍÊÇÔÚJavaÖÐʵÏÖ¶àÏß³ÌÎÒÃÇËùÐèÒª×öµÄÒ»ÇУ¡
ÕæÊÇÉñÆ棡JavaÊÇÈçºÎ×öµ½ÕâÒ»µãµÄ£¿Í¨¹ýÀ࣡×÷Ϊһ¸öÍêÈ«ÃæÏò¶ÔÏóµÄÓïÑÔ£¬JavaÌṩÁËÀà java.lang.Thread À´·½±ã¶àÏ̱߳à³Ì£¬Õâ¸öÀàÌṩÁË´óÁ¿µÄ·½·¨À´·½±ãÎÒÃÇ¿ØÖÆ×Ô¼ºµÄ¸÷¸öỊ̈߳¬ÎÒÃÇÒÔºóµÄÌÖÂÛ¶¼½«Î§ÈÆÕâ¸öÀà½øÐС£
ÄÇôÈçºÎÌṩ¸ø Java ÎÒÃÇÒªÏß³ÌÖ´ÐеĴúÂëÄØ£¿ÈÃÎÒÃÇÀ´¿´Ò»¿´ Thread Àà¡£Thread Àà×îÖØÒªµÄ·½·¨ÊÇ run() £¬ËüΪThread ÀàµÄ·½·¨ start() Ëùµ÷Óã¬ÌṩÎÒÃǵÄÏß³ÌËùÒªÖ´ÐеĴúÂ롣ΪÁËÖ¸¶¨ÎÒÃÇ×Ô¼ºµÄ´úÂ룬ֻÐèÒª¸²¸ÇËü£¡
·½·¨Ò»£º¼Ì³Ð Thread Àà
¸²¸Ç·½·¨ run()£¬ÎÒÃÇÔÚ´´½¨µÄ Thread ÀàµÄ×ÓÀàÖÐÖØд run() ,¼ÓÈëÏß³ÌËùÒªÖ´ÐеĴúÂë¼´¿É¡£ÏÂÃæÊÇÒ»¸öÀý×Ó£º
public class MyThread extends Thread {
¡¡int count= 1, number;
¡¡public MyThread(int num) {
number = num;
System.out.println("´´½¨Ïß³Ì " + number);
¡¡}
¡¡public void run() {
while(true) {
¡¡System.out.println("Ïß³Ì " + number + ":¼ÆÊý " + count);
¡¡if(++count== 6) return;
}
¡¡}
¡¡public static void main(String args[]) {
for(int i = 0; i < 5; i++) new MyThread(i+1).start();
¡¡}
}
ÕâÖÖ·½·¨¼òµ¥Ã÷ÁË£¬·ûºÏ´ó¼ÒµÄÏ°¹ß£¬µ«ÊÇ£¬ËüÒ²ÓÐÒ»¸öºÜ´óµÄȱµã£¬ÄǾÍÊÇÈç¹ûÎÒÃǵÄÀàÒѾ´
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
1£ºÓÃhttpÐÒéÉÏ´«¸üÊʺÏweb±à³ÌµÄ·½±ã£»´«Ð¡ÓÚ1MÎļþËÙ¶ÈÒª±ÈÓÃftpÐÒéÉÏ´«ÎļþÂÔ¿ì¡£°²È«ÐԺ㻲»ÏñftpÄÇÑù£»±ØÐëÒªÆô¶¯Ò»¸öftp·þÎñ²ÅÐС£
2£ºÓÃftpÐÒéÉÏ´«Îļþ´óÓÚ1MµÄÎļþËٶȱÈhttp¿ì£»ÎļþÔ½´ó£»ÉÏ´«µÄËٶȾͱÈhttpÉÏ´«¿ìµÄ±¶ÊýÔ½´ó¡£¶øÇÒÓÃjava±àд³ÌÐò£»ftp±Èhttp·½±ã¡£ºÃ£¬·Ï»°ÉÙ˵£»ÎÒÃÇÏȴһ¸öʵÀýÀ´ÀíÐÔÈÏ ......
×î½ü¿ªÊ¼ÔÚ¿´java£¬¶ÔAppletÕâ½Ú±È½Ï¸ÐÐËȤ£¬¸ÄÁ˸ÄÊéÉϵĴúÂ룬Ȩµ±Áô¸öÓ¡¼Ç
import java.awt.*;
import java.applet.*;
public class HelloApplet extends Applet
{
Font f1 = new Font("Times New Roman", Font.PLAIN, 12);
Font f2 = new Font("ËÎÌå", Font.BOLD, 24);
Font f3 = new Font("ºÚÌå", Fon ......
javaµ÷ÓÃÍⲿ³ÌÐò ±Øɱ ·¾¶¿Õ¸ñûÓÐÎÊÌâ
Runtime rt = Runtime.getRuntime();
srcFile.getName();
try {
String cmd[]={"cmd","/c",srcFile.getAbsolutePath()};
rt.exec(cmd);
} catch (IOException e1) {
// TODO Auto-genera ......
Ò» Ï̵߳Ļù±¾¸ÅÄî
Ïß³ÌÊÇÒ»¸ö³ÌÐòÄÚ²¿µÄ˳Ðò¿ØÖÆÁ÷.Ò»¸ö½ø³ÌÏ൱ÓÚÒ»¸öÈÎÎñ,Ò»¸öÏß³ÌÏ൱ÓÚÒ»¸öÈÎÎñÖеÄÒ»ÌõÖ´Ðз¾¶.£»¶à½ø³Ì:ÔÚ²Ù×÷ϵͳÖÐÄÜͬʱÔËÐжà¸öÈÎÎñ (³ÌÐò)£»¶àÏß³Ì:ÔÚͬһ¸öÓ¦ÓóÌÐòÖÐÓжà¸ö˳ÐòÁ÷ͬʱִÐУ»JavaµÄÏß³ÌÊÇͨ¹ýjava.lang.ThreadÀàÀ´ÊµÏֵģ»JVMÆô¶¯Ê±»áÓÐÒ»¸öÓÉÖ÷·½·¨(public static voi ......