Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ɵB×Ô¼º¿´µÄjava±Ê¼Ç£ºÁ¬½ÓMYSQL

  ¸ÄÒ»¸öÕâÑùµÄÌâÄ¿Õýʽ¸æËßÄ㣬ÎÒÖÕÓÚ¶¯ÊּǼһЩjavaµÄ±Ê¼ÇÁË¡£ÊµÔںܾÃûÓÐдjavaÁË¡£¹þ¹þ£¬²»ºÃÒâ˼£¬ÎªÁËflash ºǫ́ÓиöÖ§³Ö£¬java Õⲿ·Ö»¹ÊÇҪѧһµã£¬µ«²»ÊǺÜÖصãѧ¡£Õⲿ·Ö¶«Î÷£¬ÎÒ²»ÊìϤ£¬Ò²ÔÚÂýÂý¼Ç¼¡£×Ô¼º¿´µÄ±Ê¼Ç£¬ËùÒÔÒªÊÇÄã²»ÊÇɵB£¬×îºÃ²»Òª¿´¡£
   ÔÚ½ñÍíÁ·Ï°µÄʱºò£¬³¢ÊÔÈ¥Á¬½Ó¿É°®µÄmysql µÄʱºò£¬¾ÓÈ»·¢ÏÖÁËÁ½¸ö´íÎó£¬ÍøÉϲéѯÁËһЩ£¬·¢ÏÖÁËÁ½¸öÎÊÌâ
µÚÒ»¸öÎÊÌ⣺
java.lang.ClassNotFoundException 
ÃèÊöһϣ¬·¢ÉúµÄÎÊÌâ¹ý³Ì£¬Ê¹ÓÃÁËeclise ½øÐг¢ÊÔÁ¬½Ó±¾µØµÄmysql µÄʱºò£¬·¢ÉúÁËÕâ¸öÎÊÌâ¡£¾­³£ËµÕÒ²»µ½
“com.mysql.jdbc.Driver” £¬Ô­À´ÔÚÖÆ×÷µÄʱºò©ÁËÒ»¸öjdbc µÄjar Îļþ¡£
È磺mysql-connector-java-3.1.14-bin.jar £¬Îҵİ汾±È½Ï¾ÉÒ»µã¡£°ÑÕâ¸öjdbc µÄjar ÒýÈ˵½¹¤³ÌÀïÃæ¡£ºÙºÙ£¬¾ÓÈ»ÎÞÊÂÁË¡£
ʵÔÚÌ«¸ßÐËÁË¡£Ô­À´·¢ÏÖÔÚʹÓÃeclise µÄʱºò£¬Ã»ÓÐÒýÈëÕâ¸öjar °üµÄʱºò£¬»á²úÉúÕâ¸ö´íÎó¡£°ÑËûÒýÈëÈ¥¾ÍÎÞÊÂÁË¡£
ÖÁÓÚ¾ßÌåÊDz»ÊÇÕâÑùÔ­Òò£¬ÊµÔÚÎÞ·¨»Ø´ðÁË¡£ 
µÚ¶þ¸öÎÊÌ⣺ 
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/back/util.c:820]
ÍøÉÏÓиö×ö·¨£º
½â¾ö·½·¨£º
ÔÚ³ÌÐò×îºó£¬main()º¯ÊýÖÐÌí¼Ó£º
System.exit(0);
Á¬½Ómysql ±¾À´ÒѾ­²»ÊǺÜÐÂÏʵĴúÂ룬ֻÊÇ˵ÓÐʱºòÓöµ½µÄÎÊÌ⣬ֻÊÇÏë¼Ç¼һÏ¡£±ðµÄ²»Ïë˵£¬ÓÉÓÚjava ²»ÊǸöÈËר³¤¡£
ÔÚʵÏֵĹý³ÌÖУ¬Ê¹ÓÃÁË
Êý¾Ý¿âÃû£ºtest
±í£ºAdim £¨µ±ÖÐÓÐusername ºÍpwd £©Á½Ïî
´úÂëÇåµ¥£º ѧjava µÄÈ˶¼¾õµÃÏÂÃæµÄ´úÂëɵB £¬ÒòΪ×Ô¼ºÐ´¸ø×Ô¼º¿´µÄ´úÂë¡£
import java.sql.*;
public class TestDB {

//Á¬½ÓÊý¾Ý¿âMYSQL
public static void main(String[] args)
{
try
{
String driver="com.mysql.jdbc.Driver";
String url="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GB2312";
String sql="select * from admin";
String username="root";
String pwd="123";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url,username,pwd);
Statement stmt =conn.createStatement();
ResultSet rs=stmt.executeQuery(sql);

while(rs.next())
{


Ïà¹ØÎĵµ£º

javaÃæÊÔÌâ¼°´ð°¸£¨»ù´¡Ìâ122µÀ£¬´úÂëÌâ19µÀ£©

javaÃæÊÔÌâ¼°´ð°¸£¨»ù´¡Ìâ122µÀ£¬´úÂëÌâ19µÀ£©http://ilovelate.itpub.net/post/7368/40836
ilovelate | 13 ¾ÅÔÂ, 2005 00:31
JAVAÏà¹Ø»ù´¡ÖªÊ¶
1¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏó£º
³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇ
Щ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»Ê ......

java´ò°üjar£¬ÒÔ¼°manifestÎļþʹÓÃ˵Ã÷

http://20921556.javaeye.com/blog/263974
¹Ø¼ü×Ö: java jar 
 JavaµÄÒ»ÖÖÎĵµ¸ñʽ£¬JARÎļþ·Ç³£ÀàËÆZIPÎļþ£¬Ò²ÊÇÒ»¸öѹËõÎļþ¡£JARÎļþÓëZIPÎļþΩһµÄÇø±ð¾ÍÊÇÔÚJARÎļþµÄÄÚÈÝÖУ¬Ëü°üº¬ÁËÒ»¸ömeta-inf/manifest.mfÎļþ£¬Õâ¸öÎļþÊÇÔÚÉú³ÉJARÎļþµÄʱºò×Ô¶¯´´½¨µÄ¡£ÐèҪעÒâµÄÊÇ£¬JARÎļþ²»ÐèÒª½ø ......

JAVAÄÚ²¿Åàѵ×ÊÁÏ

JAVAÄÚ²¿Åàѵ×ÊÁÏ

Ò»¡¢JAVA»ù´¡ÅàѵϵÁÐ
1.ËïöÎJAVA¸ß¼¶Èí¼þ¹¤³Ìʦ°àÅàѵ¼Ïñ£¨2DVD£©
 

¼ò½é£º¹âÅÌÓÉËïöÎÀÏʦÇ××ÔÊڿμÖÆ¡£Ñ­Ðò½¥½ø¡¢Í¨Ë×Ò׶®¡¢ÊµÕ½ÐÔÇ¿¡¢ÄÚÈÝÈ«Ãæ¡¢½²½âÉî¿Ì¡¢ÎÊ´ðÐÎʽÊDZ¾Ì×Åàѵ¼ÏñµÄÌØÉ«¡£Ñ§Ô±Í¨¹ý±¾Ì×¹âÅ̵Äѧϰ£¬Äܹ»¿ì
ËÙÕÆÎÕJava±à³ÌÓïÑÔ£¬³ÉΪJava¸ßÊÖ¡£
2.´«ÖDz¥¿Í ......

java»ù´¡»Ø¹Ë ·â×°¼Ì³Ð¶à̬


ÃæÏò¶ÔÏó±à³ÌÓÐÈý¸öÌØÕ÷£¬¼´·â×°¡¢¼Ì³ÐºÍ¶à̬¡£
    ·â×°Òþ²ØÁËÀàµÄÄÚ²¿ÊµÏÖ»úÖÆ£¬´Ó¶ø¿ÉÒÔÔÚ²»Ó°ÏìʹÓÃÕßµÄÇ°ÌáϸıäÀàµÄÄÚ²¿½á¹¹£¬Í¬Ê±±£»¤ÁËÊý¾Ý¡£
    ¼Ì³ÐÊÇΪÁËÖØÓø¸Àà´úÂ룬ͬʱΪʵÏÖ¶à̬ÐÔ×÷×¼±¸¡£ÄÇôʲôÊǶà̬ÄØ£¿
    ·½·¨µÄÖØд¡¢ÖØÔØÓë ......

Java IO InputStreamReader

      ºÜ¶àµÄÎı¾Îļþ»áÓв»Í¬µÄ±àÂë¸ñʽ£¬Ôì³ÉÕâÖÖ±àÂë²îÒìµÄ¿ÉÄÜÊÇϵͳµÄ²îÒ죬¿ÉÄÜÊÇÔÚ±£´æÎļþʱ²ÉÓÃÌض¨µÄ×Ö·û¼¯±àÂëÀ´±£´æ¡£ÕâʱÎÒÃÇÀûÓÃJavaÓïÑÔÀ´´ò¿ªÕâЩÎı¾Ê±£¬Èç¹û²»Ê¹ÓÃÕýÈ·µÄ×Ö·û¼¯½âÂëÆ÷´ò¿ª£¬¿Ï¶¨»á³öÏÖÂÒÂë¡£ºÃÔÚjava.io°üÌṩÁËÒ»¸öjava.io.InputStreamReaderÀàÀ´Ö§³ÖÖ¸¶¨Îı¾× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ