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

javaÊý¾Ý¿âÁ¬½Ó¼°²âÊÔ(sqlserver)


package com.test.util;
import java.sql.*;
public class ConnectDB {
 private Connection conn=null;
 private PreparedStatement pt=null;
 private ResultSet rs=null;
 private String uname="sa";
 private String upwd="sa";
 private String url="jdbc:microsoft:sqlserver://localhost:1433;databaseName=vsktest";
 
 
 public Connection getConnection() throws Exception{
  Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
  conn=DriverManager.getConnection(url, uname, upwd);
  return conn;  
 }
 public void closeDB() throws Exception{
  if(rs!=null){
   rs.close();
  }
  if(pt!=null){
   pt.close();
  }
  if(conn!=null){
   conn.close();
  }
   
 }
 public static void main(String[] args) throws Exception {
  Connection conn=new ConnectDB().getConnection();
  PreparedStatement pt=conn.prepareStatement("select * from test");
  ResultSet rs=pt.executeQuery();
  while(rs.next())
  {
   System.out.println(rs.getString("testname"));
  }
   
 }//end main
}


Ïà¹ØÎĵµ£º

javaµ÷Óö¯Ì¬¿â(.dll»ò.so)

Ö±½Óͨ¹ýmainÈë¿Ú:
argumentsÉèÖãº-Djava.library.path=¶¯Ì¬¿âËùÔÚĿ¼
ÔÚLinuxÉϵ÷.soÎļþ£º.soÎļþ ±ØÐëÃüÃûΪ£ºlibXXX.so,È磺libJni.so
ÔÚWindowsÉϵ÷.dllÎļþ£º.dllÎļþ ÃüÃû²»Òª¼Ólib,Ö±½ÓÃüÃûΪ£ºXXX.dll È磺Jni.dll
Àý£º
¶¯Ì¬¿â£ºlibJniNassirDecrypt.so »ò JniNassirDecrypt.dll
javaµ÷Óö¯Ì¬¿â´úÂë:
Str ......

JAVA¶¨Ê±Æ÷ÀàµÄʹÓÃ


Java´úÂë
import java.util.Timer;   
import java.util.TimerTask;  
import java.util.Timer;
import java.util.TimerTask;
Java´úÂë
public class Test {   
 public static void main(String[] args) {    ......

C/C++ÓëJava¶àάÊý×飬±éÀúÓë×î´óÖµ»ñÈ¡·½·¨£¡

C/C++
/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010Äê4ÔÂ29ÈÕ, ÉÏÎç9:46
*/
#include <iostream>
using namespace std;
int maximum(int[], int);
int main(int argc, char** argv) {
// int sg[3][4] = {
int sg[][4] = {
{68, 77, 73, 86},
{87, 96, 7 ......

JAVA³£ÓòÙ×÷Óï¾ä ÏîÄ¿ÖеÄ×ܽá¶þ


jspÊä³ö¸ñʽ»¯ºóµÄÈÕÆÚ
<fmt:formatDate value="${whiteNumber.crtdate }" pattern="yyyy-MM-dd HH:mm:ss"/>
ÈçÊÇmodelÀïµÄlistÔÚactionÖÐÈ¡²»µ½Öµ¡£¿ÉÄÜÔÚ¸ÃmodelÖеÄlistµÄsetterºÍgetter·½Ê½ÖУ¬Ê¹ÓõĿÉÄÜÊÇlazy¼ÓÔØ£¬¸ÄΪEAGER¼´¿É¡£
<s:iterator>±êÇ©ÀﻹÓÐ<s:iterator>± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ