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

java´úÂë»ñÈ¡Êý¾Ý¿âÁ¬½Ó²¢²Ù×÷Êý¾Ý¿âÓû§

 
ADFÖлñµÃÊý¾Ý¿âÁ¬½Ó£¬¶ÁÈ¡xmlÎļþµÄÊý¾Ý£¬²¢½«Æäдµ½Êý¾Ý¿âÖУº
public static void main(String[] argv) throws Exception {
       //»ñµÃÇý¶¯
        Class driverClass = Class.forName("oracle.jdbc.OracleDriver");
      //Á¬½ÓÊý¾Ý¿âµÄÓû§
        Connection jdbcConnection =
            DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE",
                                        "CampusAccounts", "xxxxxx");
     //н¨Ò»¸öÊý¾Ý¿âÁ¬½Ó
        IDatabaseConnection connection = new DatabaseConnection(jdbcConnection);
   //¶ÁÈ¡±¾µØµÄxmlÎļþ
        IDataSet dataSet = new FlatXmlDataSet(new File("c:\\CampusAccounts.xml"));
        try {
           //½«Êý¾Ýдµ½Êý¾Ý¿âÓû§µÄ±íÖÐ
            DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet);
        }
 finally {
            connection.close();
        }
     }
/////////
ºÍ .NetÓÐʲô²»Í¬£¿ÓÐʲô²»Í¬£¿ÓÐʲô²»Í¬£¿


Ïà¹ØÎĵµ£º

½â¾öjava±à³ÌÂÒÂëÎÊÌâ

´¦ÀíÂÒÂëÎÊÌâ
1¡¢¹æ·¶Êý¾Ý¿âºÍÒ³ÃæËùÓбàÂëͳһΪһÖÖÀýÈçutf-8
2¡¢hibernateÁ¬½ÓÊý¾Ý¿âÉèÖÃÁ¬½Ó±àÂë
<session-factory>
   <property name="connection.url">
   jdbc:mysql://127.0.0.1:3306/leaveword?useUnicode=true&amp;characterEncoding=utf-8
  & ......

java º¯Êý²ÎÊýµÄ´«µÝÎÊÌâ¡£

×î½üÔÚѧϰjavaµÄʱºò£¬¶ÔÓÚjavaº¯ÊýµÄ´«µÝÁ˽âÁËһϡ£javaµÄÊý¾ÝÀàÐÍ´óµÄ·ÖΪÁ½ÖÖ£¬Ò»ÖÖÊÇ»ù±¾Êý¾ÝÀàÐÍ£¬ÁíÒ»ÖÖÊÇ·Ç»ù±¾Êý¾ÝÀàÐÍ£¬£¨ÀàÊý¾ÝÀàÐÍ£©¡£ÔÚ²ÎÊý´«µÝʱºò£¬»ù±¾µÄÊý¾ÝÀàÐÍ´«µÝµÄÊǶÔʵ²ÎÊýµÄÒ»·Ý¿½±´£¬¶ø·Ç»ù±¾Êý¾ÝÀàÐÍÔòÊÇʵÀýµÄÒýÓõÄÒ»·Ý¿½±´¡£ÎÒµÄÀí½âÊÇÀàµÄʵÀý£¬¼´¶ÔÏó´æ·ÅµÄÄÚÈݾÍÊÇÒýÓã¬Êµ¼ÊÊǵØÖ·¡£
......

¼òµ¥µÄjavaͼƬËõ·Å´úÂë

/**
* @param source: source image file
* @param output: output image file
* @param mode: 0 ratio,1 maxWidth,2 maxHeight,3 maxSide
* @param maxSide: maxWidth, maxHeight or maxSide, different by mode
* @param ratio: ratio if resized by ratio
*/
public static void resizeImage(File ......

Java native2ascii ¼òµ¥×ªÂë

native2ascii.exe ÊÇ Java µÄÒ»¸öÎļþתÂ빤¾ß£¬Êǽ«ÌØÊâ¸÷ÒìµÄÄÚÈÝ ×ªÎª ÓÃÖ¸¶¨µÄ±àÂë±ê×¼ÎÄÌåÐÎʽͳһµÄ±íÏÖ³öÀ´£¬Ëüͨ³£Î»ÓÚ JDK_home\bin Ŀ¼Ï£¬°²×°ºÃ Java SE ºó£¬¿ÉÔÚÃüÁîÐÐÖ±½ÓʹÓà native2ascii ÃüÁî½øÐÐתÂ룬ʾÀý£º
native2ascii -encoding 8859_1 c:\test.txt c:\temp.txt
½« test.txt ÎļþÄÚÈÝÓà 8859_1 × ......

ÔÚJavaÖе÷ÓÃC++

ÔÚjavaÖе÷ÓÃ×Ô¼ºµÄc++´úÂëÊÇÒ»¼þ¼òµ¥µÄÊÂÇ飬ÒÔÏÂÀàΪÀý£º
class Prompt {
  private native String getLine(String prompt);
  public static void main(String args[]) {
    Prompt p = new Prompt();
    String input = p.getLine("Type a line: ");
  &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ