˵һÏÂJavaÀïÃæµÄ·¾¶ÎÊÌ⣬CLASSPATHºÍSOURCEPATH
javaµÄ·¾¶ÈÃÐí¶àÈË£¬ÌرðÊdzõѧÕ߸е½ÃÔ»ó£¬ÎÒÕâÀïÔÙ½âÊÍһϡ£ÎÒÃÇ·Ö2¸ö½×¶Î£¬1ÊDZàÒë½×¶Î£¬2ÊÇÔËÐн׶Ρ£
Ò»¡¢±àÒë½×¶Î
Õâ¸öʱºò£¬ÎÒÃÇÒªÌṩ¸ø±àÒëÆ÷µÄÓÐ2¸ö·¾¶²ÎÊý£¬µÚÒ»¸öÊÇÔ´´úÂëÔÚÄÄÀҲ¾ÍÊÇ sourcepath,µÚ¶þ¸ö¾ÍÊÇÒÀÀµµÄÀàÔÚÄÄÀҲ¾ÍÊÇ classpath
ÎÒÃÇ¿´Ò»¸öÀý×Ó
d:\temp\TestCP\d1\p1\Class1.java
view plaincopy to clipboardprint?
package p1;
public class Class1 {
public void show(){
System.out.println("Class1");
}
}
package p1;
public class Class1 {
public void show(){
System.out.println("Class1");
}
}
d:\temp\TestCP\d2\p2\Class2.java
view plaincopy to clipboardprint?
package p2;
import p1.Class1;
public class Class2 {
public static void main(String[] args){
Class1 c1 = new Class1();
c1.show();
}
}
package p2;
import p1.Class1;
public class Class2 {
public static void main(String[] args){
Class1 c1 = new Class1();
c1.show();
}
}
±àÒëµÄʱºò£¬ÎÒÃÇÏÈÔÚ d:\temp\testCP\d1 ±àÒëClass1
D:\temp\testCP\d1>javac p1\Class1.java
±àÒë³É¹¦
È»ºóÎÒÃÇÔÚ d:\temp\testCP\d2 ϱàÒë Class2¡£ÓÐ2¸ö·½·¨½øÐбàÒ룺
µÚÒ»£ºÖ¸¶¨Ô´Îļþ sourcepath
D:\temp\testCP\d2>javac -sourcepath .;../d1 p2\Class2.java
µÚ¶þ£ºÖ¸¶¨classpath
D:\temp\testCP\d2>javac -sourcepath . -cp ../d1 p2\Class2.java
Á½¸ö·½·¨¶¼ÄÜ´ïµ½ÎÒÃÇÐèÒªµÄЧ¹û¡£Ò²¾ÍÊÇ˵£¬ÔÚ·¾¶Àϵͳ»áÔÚÆäÏÂÃæ¸ù¾Ýpackage×Ô¶¯Ñ°ÕÒÔ´Îļþ»òÕßclassÎļþµÄ¡£
ÁíÒ»¸öÇé¿ö£¬Èç¹ûÎÒÃÇÐèҪij¸öÀà¿âµÄÖ§³Ö£¬±ÈÈçjarÎļþ£¬ÄÇôÎÒÃǾͲ»ÄÜÖ»°üº¬Â·¾¶¾ÍÐÐÁË£¬¶øÊÇÓ¦¸Ã°üº¬Õû¸ö·¾¶ºÍÎļþÃû£¬±ÈÈç
D:\temp\testCP\d2>javac -sourcepath . -cp ../d1;d:/lib/spring.jar p2\Class2.java
µÚ¶þ¡¢ÔÚÔËÐÐʱ
ÎÒÃÇÐèÒªÖ¸¶¨ÆäËûµÄclassÔÚÄÄÀÒÔ¼°ÎÒÃÇÐèÒªµÄÀà¿âÔÚÄÄÀËùÒÔÔËÐÐÃüÁîÓ¦¸ÃÊÇ
D:\
Ïà¹ØÎĵµ£º
1.ÉèÖÃCookie
Cookie cookie = new Cookie("key", "value");
cookie.setMaxAge(60);
ÉèÖÃ60ÃëÉú´æÆÚ£¬Èç¹ûÉèÖÃΪ¸ºÖµµÄ»°£¬ÔòΪä¯ÀÀÆ÷½ø³ÌCookie(ÄÚ´æÖб£´æ)£¬¹Ø±Õä¯ÀÀÆ÷¾ÍʧЧ¡£
cookie.setPath("/test/test2");
ÉèÖÃCookie·¾¶£¬²»ÉèÖõĻ°Îªµ±Ç°Â·¾¶(¶ÔÓÚServletÀ´ËµÎªrequest. ......
A:²»´øÊä³ö²ÎÊýµÄ
---------------²»´øÊä³ö²ÎÊýµÄ----------------------------------
create procedure getsum
@n int =0<--´Ë´¦Îª²ÎÊý-->
as
declare @sum int<--¶¨Òå±äÁ¿-->
declare @i int
set @sum=0
set @i=0
while @i<=@n begin
set @sum=@sum+@i
set @i=@i+1
end
print ......
×î½ü¹¤×÷ÐèÒª½«java³ÌÐò´ò°ü·¢²¼£¬²¢ÇÒÄܰ²×°³Éwindows·þÎñ£¬¶øÇÒÐèÒªÔÚûÓа²×°jreµÄ»úÆ÷ÉÏÔËÐС£Ñо¿ÁËÒ»ÏÂjava service wrapper£¬ÔÚÍøÉÏÕÒÁËÏà¹ØµÄ×ÊÁÏ£¬µ«ÊǶ¼ËµµÃ²»ÊǺÜÏêϸ£¬ÕÕ×Å×öÓÐÒ»¶¨ÄѶȡ£ËùÒÔÎÒ·Ö²½×ܽáÁËһϣ¬Ï£Íû¸øÓöµ½ÏàͬÎÊÌâµÄͬÈÊÒ»µã°ïÖú¡£
1. Ê×ÏÈÏÂÔØjava serv ......
jspx Ò»¸öÀ´×ÔÓÚ°£¼°µÄjava web¿ìËÙ¿ª·¢¿ò¼Ü
À´Ô´£ºhttp://www.javaeye.com/news/4887
Ã÷£ºJavaEyeÐÂÎÅÎÄÕµİæÈ¨ÊôÓÚJavaEyeÍøÕ¾ËùÓУ¬ÑϽûÈκÎÍøÕ¾×ªÔØ±¾ÎÄ£¬·ñÔò±Ø½«×·¾¿·¨ÂÉÔðÈΣ¡
ÔõôÓÖð³öÒ»¸öweb¿ò¼Ü?
¿´¿´ÏÖ´æµÄJava webÓ¦ÓóÌÐò¿ò¼Ü£¬ÎÞÒ»ÀýÍâµÄÒªÇ󻨷ѴóÁ¿µÄʱ¼äÓ뾫Á¦ºó²Å¿ÉͶÈëÉ ......
CookieÔÚWebÓ¦ÓóÌÐòÖб»¹ã·º²ÉÓã¬Î¬»¤ä¯ÀÀÆ÷ºÍ·þÎñÆ÷Ö®¼äµÄ״̬¡£Òź¶µÄÊÇÕâÒ»ÌØÐÔÔÚJava
MEƽ̨Öв¢Ã»Óеõ½Ö§³Ö¡£Òò´Ë£¬ÒªÏëά³Ö¿Í»§¶ËºÍ·þÎñÆ÷¶ËµÄ״̬Ôò±ØÐëʹÓÃURLÖØÐ´µÄ·½Ê½¡£URLÖØÐ´²Ù×÷ÆðÀ´±È½ÏÂé·³£¬ËùÒÔÑо¿Ò»ÏÂcookieµÄ
ÔÀí²¢ÔÚJava MEƽ̨ÉÏʵÏÖcookieÊDz»´íµÄ³¢ÊÔ¡£
Ê×ÏÈ£¬ÎÒÃÇÀ´¿´Ò»ÏÂcookieµÄÔÀí¡£µ± ......