JAVA»·¾³±äÁ¿µÄÅäÖÃ
JAVAµÄ³ÌÐò¿ª·¢£¬µÚÒ»²½ÊÇÕë¶ÔJAVA´î½¨ÆäÓ¦Óÿª·¢Æ½Ì¨¡£¹ØÓÚJDKµÄÏÂÔØÓë°²×°Ôڴ˲»¹ý¶à½éÉÜ£¬ÍøÉÏÏà¹ØÁ´½Ó½Ï¶à¡£Æ½Ì¨µÄ´î½¨Ò»¸ö»ù´¡²½ÖèÇҹؼü²½Öè¾ÍÊÇ£ºjava»·¾³±äÁ¿µÄÅäÖá£ÍøÉϹØÓÚJAVAµÄ»·¾³±äÁ¿ÉèÖ÷½·¨ºÜ¶à£¬Æð³õ½Ó´¥JAVA¿Ï¶¨ÓÐÐí¶à²»Ã÷°×µÄµØ·½£¬ÎÒÃÇÐèÒª°Ñ²½Ö辡Á¿µÄ¼ò»¯£¬±¾È˾õµÃ±È½ÏÓÐЧµÄ·½·¨ÈçÏ£º
Ò»¡¢windows ƽ̨ÏÂjava»·¾³±äÁ¿µÄÅäÖÃ
µã»÷ ÎҵĵçÄÔ -¡·ÊôÐÔ-¡·¸ß¼¶-¡·»·¾³±äÁ¿
È»ºó ÔÚ´ËÖ÷Òª±à¼Á½¸ö±äÁ¿classpath ºÍpath ¡£Í¨³£Çé¿öϱäÁ¿Ãû£ºclasspath²»´æÔÚ£¬ËùÒÔÎÒÃDZØÐëн¨Ò»¸öclasspath
½Ó×Å Ìîдclasspath ºÍpath µÄ±äÁ¿Öµ¡£
classpath µÄ±äÁ¿ÖµÎª£º .;C:\Program Files\Java\jdk1.6.0_14\lib\dt.jar;C:\Program Files\Java\jdk1.6.0_14\lib\tools.jar
path µÄ±äÁ¿ÖµÎª£º ;C:\Program Files\Java\jdk1.6.0_14\bin
ºÃ£¬ÉèÖÃÍê³ÉÒÔºóµã»÷ È·¶¨¡£
´Ëʱ£¬±äÁ¿ÅäÖÃÍê±Ï¡£
×¢Ò⣺ a ×¢Òâ: Ç°ÃæµÄ“.;”·ûºÅ£¬±ØÐëÌîд¡£
b ÄãÒª½« C:\Program Files\Java\jdk1.6.0_14 ¸ÄΪÄãµÄJAVA°²×°Ä¿Â¼¡£
¶þ¡¢linux ƽ̨ÏÂjava»·¾³±äÁ¿µÄÅäÖãº
Ê×ÏÈ °²×°JDKµ½Ä¿Â¼/usr/java/jdk1.6.0_14
È»ºó ÓÃvi±à¼Æ÷´ò¿ª“profile”Îļþ vi /etc/profile
½Ó×Å ÔÚºóÃæÌí¼ÓÒÔÏÂÄÚÈÝ£º
¡¡¡¡¡¡¡¡¡¡¡¡JAVA_HOME=/usr/java/jdk1.6.0_14 ¡¡¡¡¡¡¡¡¡¡
¡¡PATH=$JAVA_HOME/bin:$PATH
¡¡¡¡¡¡¡¡¡¡¡¡CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
¡¡¡¡¡¡¡¡¡¡¡¡export JAVA_HOME
¡¡¡¡¡¡¡¡¡¡¡¡export PATH
¡¡¡¡¡¡¡¡¡¡¡¡export CLASSPATH
×îºó ±£´æ²¢Í˳övi ±à¼Æ÷ ÖØеǼ£º½øÈëviµÄÃüÃûģʽ°´ wq£¡
Ïà¹ØÎĵµ£º
¡¾ÉùÃ÷¡¿×ªÌûµØÖ· £º http://tech.ddvip.com/2009-04/1239788309115180.html
MailSenderInfo .java :
package com.util.mail;
import java.util.Properties;
/**
* @author AllanKing
* @date 2009-11-12
*/
public class MailSenderInfo {
// ·¢ËÍÓʼþµÄ·þÎñÆ÷µÄIPºÍ¶Ë¿Ú
private String mailServerHost;
......
Java ÖиøÊý×Ö×ó±ß²¹0 £¨1£©·½·¨Ò»
import java.text.NumberFormat; public class NumberFormatTest { public static void main(String[] args) {
//´ý²âÊÔÊý¾Ý
int i = 1;
......
¿Î³ÌÄÚÈÝ
¸ü¼ÓʵÓÿÆѧµÄJava»ù´¡¿Î³Ì
¾ßÓÐÔúʵµÄ±àÂ빦µ×ÊÇÒ»¸öJava¹¤³Ìʦ±Ø±¸µÄÄÜÁ¦£¬ÎÒÃÇÁ¦Çó´ÓѧԱ½Ó´¥JavaµÄµÚÒ»ÌìÆð¾ÍÅàÑøÆäÐγÉÕýȷ˼¿¼ÎÊÌâµÄ·½Ê½¡£ÎÒÃǵĹØ×¢µã²»½ö½öÔÚÓÚ¶Ôij¸öÀà¿â£¨API£©µÄÕÆÎÕ£¬¸ü¶àµÄÊÇÏòѧԱչʾÆóÒµÖÐÕæÕýÒªÖØÊÓµÄÎÊÌ⣬ÀýÈçÒì³£ÈçºÎ´¦Àí¡¢Ëã·¨ÈçºÎÓÅ»¯µÈ¡£Í¬Ê±£¬ÎÒÃÇ×¢ÖØÈÃѧԱÑø³ÉÁ¼ºÃµ ......
JAVAÐéÄâ»úÓÐÒ»¸ö×Ö·û´®³Ø,¶ÔÓÚ×Ö·û´®³ØµÄ·ÃÎÊ¿ÉÒÔʹÓÃ×Ö·û´®¶ÔÏóµÄintern()·½·¨,¿É¶¯Ì¬Ïò³ØÖÐÌí¼Ó¶ÔÏó,ËüµÄ¶¨ÒåÈçÏÂ:
public native String intern();
ÕâÊÇÒ»¸ö±¾µØ·½·¨,ÔÚµ÷ÓÃÕâ¸ö·½·¨Ê±,JAVAÐéÄâ»úÊ×Ïȼì²é×Ö·û´®³ØÖÐÊÇ·ñ´æÔÚÓë¸Ã×Ö·û´®¶ÔÏóÖµÏàµÈµÄ¶ÔÏó,Èç¹û´æÔھͷµ»Ø×Ö·û´®³ØÖеĶÔÏóµÄÒýÓÃ,·ñÔò¾Íд´½¨Ò»¸ö ......
JAVA·´Éä»úÖÆÊÇÔÚÔËÐÐ״̬ÖУ¬¶ÔÓÚÈÎÒâÒ»¸öÀ࣬¶¼Äܹ»ÖªµÀÕâ¸öÀàµÄËùÓÐÊôÐԺͷ½·¨£»¶ÔÓÚÈÎÒâÒ»¸ö¶ÔÏ󣬶¼Äܹ»µ÷ÓÃËüµÄÈÎÒâÒ»¸ö·½·¨£»ÕâÖÖ¶¯Ì¬»ñÈ¡µÄÐÅÏ¢ÒÔ¼°¶¯Ì¬µ÷ÓöÔÏóµÄ·½·¨µÄ¹¦ÄܳÆΪjavaÓïÑԵķ´Éä»úÖÆ¡£
Java·´Éä»úÖÆÖ÷ÒªÌṩÁËÒÔϹ¦ÄÜ£º ÔÚÔËÐÐʱÅжÏÈÎÒâÒ»¸ö¶ÔÏóËùÊôµÄÀࣻÔÚÔËÐÐʱ¹¹ÔìÈÎÒâÒ»¸öÀàµÄ¶Ô ......