win7£¨windows7£©ÏÂjava»·¾³±äÁ¿ÅäÖ÷½·¨
win7£¨windows7£©ÏÂjava»·¾³±äÁ¿ÅäÖ÷½·¨
windows7ÏÂjava»·¾³±äÁ¿ÅäÖ÷½·¨£º
1.ÓÃÊó±êÓÒ»÷“ÎҵĵçÄÔ”->ÊôÐÔ
Ñ¡Ôñ×ó±ßµ¼º½µÄ“¸ß¼¶ÏµÍ³ÉèÖÔѡÏȻºóÕâ»ØÊìϤÁ˰ɣ¿
¼ÌÐøÑ¡ÔñÓÒϽǵē»·¾³±äÁ¿”Ñ¡Ïî
2.½øÐÐwin7ÏÂJava»·¾³±äÁ¿ÅäÖÃ
ÔÚ"ϵͳ±äÁ¿"ϽøÐÐÈçÏÂÅäÖãº
(1)н¨->±äÁ¿Ãû£ºJAVA_HOME ±äÁ¿Öµ£ºC:\Program Files\Java\jdk1.6.0_10(ÕâÖ»ÊÇÎÒµÄJDK°²×°Â·¾¶,ÕâÀïÊǸù¾Ý×Ô¼ºµÄ°æ±¾ºÍ·¾¶¶øÉèÖõģ¬×îºÃÔÚµØÖ·À¸Ö±½Ó¿½±´Ä¿Â¼)
(2)±à¼->±äÁ¿Ãû£ºPath ÔÚ±äÁ¿ÖµµÄ×îÇ°Ãæ¼ÓÉÏ£º%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
(3)н¨->±äÁ¿Ãû£ºCLASSPATH ±äÁ¿Öµ£º.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar
×¢Ò⣺µ±ÉèÖõıäÁ¿ÔÚĩβʱ£¬²»Òª¼ÓÉÏ“£»”¡£
3.²âÊÔÏ»·¾³±äÁ¿ÊÇ·ñÉèÖóɹ¦
ÔÚ×óϽǵÄËÑË÷¿òÖмüÈë
cmd
»òÕß°´Ï“WIN+R”¼ü,“WIN”¼ü¾ÍÊÇ"CTRL"ºÍ“ALT””ÖмäÄǸö΢Èíͼ±êÄǸö¼ü£»
·Ö±ðÊäÈëjava£¬javac£¬java -version ÃüÁî
Èç¹û³öÏÖÈçÏÂÐÅÏ¢£º
4.ÄãµÄJava»·¾³±äÁ¿ÅäÖóɹ¦£¡
×¢Òâ:
Èô³öÏÖ
'javac' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò
»òÅú´¦ÀíÎļþ¡£
˵Ã÷´Ë´ÎJava»·¾³±äÁ¿ÅäÖóö´íÁË£¬×Ðϸ¼ì²éϰɣ¡
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
1.servlet²úÉúÑéÖ¤Â룺
package com.servlet;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Random;
import javax.imageio.ImageIO; ......
E:\>javac -X
-Xlint ÆôÓý¨ÒéµÄ¾¯¸æ
-Xlint:{all,deprecation,unchecked,fallthrough,path,serial,finally,-deprecat ion
,-unchecked,-fallthrough,-path,-serial,-finally}ÆôÓûò½ûÓÃÌØ¶¨µÄ¾¯¸æ
& ......
¿ÉÄÜ´ó¶àÊýJsp¿ª·¢Ô±ÔÚдÍê³ÌÐò²âÊÔͨ¹ýºó£¬²»Ì«»á¹Ø×¢JspÉú³ÉµÄJavaÎļþ£¬Æäʵ£¬Í¨¹ýJava´úÂ룬¸üÄÜÌåÏÖ³ÌÐò´úÂëµÄÕæÕýº¬Ò壬¶Ô½øÒ»²½Ñо¿³ÌÐò´úÂëµÄºǫ́ÔËÐÐÇé¿öÊǷdz£ÓаïÖúµÄ¡£ÀýÈ磬ÓÃJsp±àд´úÂëʱ£¬ÓÐʱºòÓÃ<%! %>£¬ÓÐʱºòÓÃ<% %>£¬¼Ó²»¼Ó¸Ð̾º ......
ÔÚÓ¦Óÿª·¢ÖУ¬¾³£ÐèҪһЩÖÜÆÚÐԵIJÙ×÷£¬±ÈÈçÿ5·ÖÖÓÖ´ÐÐijһ²Ù×÷µÈ¡£ÔÚWEBÏîÄ¿ÖпÉÄÜÐèҪÿ¸ôÒ»¶Îʱ¼ä×Ô¶¯Éú³É¾²Ì¬Ò³£¬×Ô¶¯¼ì²âÊÇ·ñÓÐÐÂÓʼþ£¬¶¨Ê±×Ô¶¯±¸·ÝÎļþµÈ²Ù×÷¡£ÕâЩ¶¼¿ÉÒÔͨ¹ý¶¨Ê±Æ÷TimerÀ´½â¾ö¡£
ÕâÀï½öÌṩ¶¨Ê±Æ÷µÄ²¿·Ö·½·¨ºÍ˵Ã÷£¬¾²Ì¬Ò³Éú³ÉµÈ²Ù×÷¶ÁÕß¿ÉÒÔͨ¹ýÏà¹Ø·½·¨×ÔÐнâ¾ö¡£
¡£¡£¡£°Ù¶È¿Õ¼äÌù´úÂë×ÜÊ ......