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

Java¡¢sql server 2000¼°jdbc

ÎÒÔÚѧϰ¹ØÓÚjava±à³Ì£¬ÏÖÔÚÉæ¼°µ½µÄÊÇsqlµÄÎÊÌ⣬±ÈÈçÈí¼þÑ¡Ôñ¡¢»·¾³µÄÁ¬½ÓÉèÖõÈÎÊÌ⣬¶ÔÓÚÕâЩÎÊÌâÎÒÕæÊÇÊøÊÖÎ޲߰¡£¡ÇëÇóJava±à³Ì¸ßÊִͽ̣º
      1¡¢ÎÒÓõÄJavaÊÇj2sdk-1_4_2_13-nb-5_0£¬ÎÒÓÃÁËsql server2000£¬ÎÒÓÃjdbc3.0ÐÐÂð£¿ËùÓÐÁ¬½ÓÉèÖøÃÔõôÑùÉèÖã¿
      2¡¢±ÈÈçÏÂÃæ³ÌÐò£º
import java.sql.*;
public class DBConnection
{   
  private static String driver="com.Microsoft.jdbc.sqlserver.SQLServerDriver";
  private static String url="jdbc:microsoft:sqlserver://localhost:1433:DatabaseName=wen";
  private static String user="sa";
  private static String password="sa";
  public  static Connection getConnection()
  {
     Connection con;
     try
      {
        Class.forName(driver);
        con=DriverManager.getConnection(url,user,password);
        return con;
       }catch(ClassNotFoundException e)
       {
           System.out.println(e.getMessage());
 }
        catch(SQLException e)
 {
   System.out.println(e.getMessage());
 }
        return  null;
  }
 
}
½á¹ûÏÔʾ£ºException in thread "main" java.lang.NoSuchMethodError:mian
ÇëÎʸÃÔõô½â¾ö£¿Ð»Ð»


Ïà¹ØÎĵµ£º

java ²éѯ¿ÉÓÃÓòÃû

Õâ¶Îʱ¼äÔÚ×¢²áÓòÃû£¬ÔÛÆð²½Íí£¬ºÃÓõÄÓòÃû¶¼¸ø±ðÈË×¢²áÁË¡£
ÏëÕÒ¸öλÊýÉÙµÄ.comÓòÃû£¬¿ÉÊÇ·¢Ïִ󲿷ֶ¼×¢²áÁË£¬Ò²¾ÍÊÇ˵£¬ÎÒµã»÷µÄ¶à´Î²éѯ¶¼ÊÇÀË·Ñ¿¨Â·ÀÎҿɲ»Ïë¼õ·Ê£©
ÓÚÊÇ»¨Á˵ãʱ¼ä£¬ÓÃjavaдÁ˸ö¸ù¾ÝÖ¸¶¨Î»Êý²éѯËùÓпÉÓõÄ.comÓòÃûµÄС³ÌÐò¡£ÌṩԴÂëÏÂÔØ¡£
ÎÒÀûÓõÄÊÇwhoisÕâ¸öÓòÃû²éѯÍøվȡµÃÊý¾Ý£¬ÔÚ²âÊÔµ ......

½«JAVAÖеÄÊý×éת»»³ÉJS µÄÊý×é

JAVA ´úÂëÈçÏ£º
<%
        //    µÃµ½Òª×ª»»µÄÊý×é---µ±È»ÕâÀïÒ²¿ÉÒÔÊÇÆäËûÀàÐ͵ÄÊý×é
        List jsList = (List) request.getAttribute("gczbh"); 
%>
JS  ´úÂëÈçÏ£º
<script type="text/javascrip ......

ZlibѹËõËã·¨ÔÚjavaÉϵÄÓ¦ÓÃ

JAVAʵÏÖ
¡¡¡¡ÔÚJDKÖУ¬ÔÚjava.util.zip°üÖÐÒѾ­ÄÚÖÃÁËZLIBµÄʵÏÖ£¬Ê¾Àý´úÂëÈçÏ£º
1//½âѹ
2 public String decompressData(String encdata) {
3 try {
4 ByteArrayOutputStream bos = new ByteArrayOutputStream(); 
5 InflaterOutputStream zos = new InflaterOutputStream(bos); 
6 zo ......

UbuntuÏÂjava»·¾³ÅäÖÃ

Ò»¡¢¸øUbuntuÅäÖÃJAVA»·¾³ 
¡¡ 
¡¡¡¡²Ù×÷ϵͳ°æ±¾£ºUbuntu 7.10 Gutsy 
¡¡ 
¡¡¡¡JAVA°æ±¾£ºJAVA 6 
¡¡ 
¡¡¡¡ÔÚUbuntuÏ°²×°JAVAÐéÄâ»úºÍSDK£¨¿ª·¢°ü£©ÊǷdz£ÇáËÉÈÝÒ׵ģº 
¡¡ 
¡¡¡¡ÁªÍøµÄÇé¿öÏÂÔÚÖÕ¶ËÏÂÊäÈëÃüÁî 
¡¡ 
¡¡¡¡$sudo apt-get& ......

java±ÊÊÔ1

1. HttpSession session = request.getSession() 
ÓëHttpSession session = request.getSession(true)µÄÇø±ð£¿ 
²Î¿¼´ð°¸£º 
getSession(true)µÄº¯ÊýÔ­ÐÍΪ:£ºHttpSession session = request.getSession (Boolean create) 
Èç¹ûÓÐÓ뵱ǰµÄrequestÏȹØÁªµÄHttpSession,ÄÇô·µ»ØrequestÏà¹ØÁªµÄHttpS ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ