java¶¯Ì¬±àÒë¼°ÔËÐÐ
תIBMµÄÎÄÕ£¬±È½ÏÏêϸ¡£ÐèҪעÒâµÄÊÇ£¬
ͨ¹ýJavaCompiler½øÐбàÒ붼ÊÇÔÚµ±Ç°Ä¿Â¼ÏÂÉú³É.classÎļþ£¬¶øʹÓñàÒëÑ¡Ïî¿ÉÒԸıäÕâ¸öĬÈÏĿ¼¡£±àÒëÑ¡ÏîÊÇÒ»¸öÔªËØΪStringÀàÐ͵ÄIterable¼¯ºÏ¡£ÈçÎÒÃÇ¿ÉÒÔʹÓÃÈçÏ´úÂëÔÚDÅ̸ùĿ¼ÏÂÉú³É.classÎļþ¡£
Iterable options = Arrays.asList("-d", "d:\\");
JavaCompiler.CompilationTask task = compiler.getTask(null, fileManager,
diagnostics, options, null, compilationUnits);
2006 Äêµ×£¬Sun ¹«Ë¾·¢²¼ÁË Java Standard Edition 6£¨Java SE 6£©µÄ×îÖÕÕýʽ°æ£¬´úºÅ Mustang£¨Ò°Âí£©¡£¸ú Tiger£¨Java SE 5£©Ïà±È£¬Mustang ÔÚÐÔÄÜ·½ÃæÓÐÁ˲»´íµÄÌáÉý¡£Óë Tiger ÔÚ API ¿â·½ÃæµÄ´ó·ù¶È¼ÓÇ¿Ïà±È£¬ËäÈ» Mustang ÔÚ API ¿â·½ÃæµÄÐÂÌØÐÔÏԵò»Ì«¶à£¬µ«ÊÇÒ²ÌṩÁËÐí¶àʵÓúͷ½±ãµÄ¹¦ÄÜ£ºÔڽű¾£¬WebService£¬XML£¬±àÒëÆ÷ API£¬Êý¾Ý¿â£¬JMX£¬ÍøÂçºÍ Instrumentation ·½Ã涼Óв»´íµÄÐÂÌØÐԺ͹¦ÄܼÓÇ¿¡£ ±¾ÏµÁÐ ÎÄÕÂÖ÷Òª½éÉÜ Java SE 6 ÔÚ API ¿â·½ÃæµÄ²¿·ÖÐÂÌØÐÔ£¬Í¨¹ýһЩÀý×Ӻͽ²½â£¬°ïÖú¿ª·¢ÕßÔÚ±à³Ìʵ¼ùµ±ÖиüºÃµÄÔËÓà Java SE 6£¬Ìá¸ß¿ª·¢Ð§ÂÊ¡£
±¾ÎÄÊÇÆäÖеĵÚËÄƪ£¬½éÉÜÁË JDK 6 ÖÐΪÔÚÔËÐÐʱ²Ù×ݱàÒëÆ÷ËùÔö¼ÓµÄ±àÒëÆ÷ API£¨JSR 199£©¡£Äú½«Á˽⵽£¬ÀûÓÃ´Ë API ¿ª·¢ÈËÔ±¿ÉÒÔÔÚÔËÐÐʱµ÷Óà Java ±àÒëÆ÷£¬»¹¿ÉÒÔ±àÒë·ÇÎı¾ÐÎʽµÄ Java Ô´´úÂ룬×îºó»¹Äܹ»²É¼¯±àÒëÆ÷µÄÕï¶ÏÐÅÏ¢¡£±¾ÎĽ«Õ¹¿ªÃèÊöÕâЩ¹¦ÄÜ£¬²¢Ê¹ÓÃÕâЩ¹¦Äܹ¹ÔìÒ»¸ö¼òµ¥µÄÓ¦Óà —— ÔÚÄÚ´æÖУ¬Ö±½ÓΪһ¸öÀàÉú³É²âÊÔÓÃÀý¡£
РAPI ¹¦Äܼò½é
JDK 6 ÌṩÁËÔÚÔËÐÐʱµ÷ÓñàÒëÆ÷µÄ API£¬ºóÃæÎÒÃǽ«¼ÙÉè°Ñ´Ë API Ó¦ÓÃÔÚ JSP ¼¼ÊõÖС£ÔÚ´«Í³µÄ JSP ¼¼ÊõÖУ¬·þÎñÆ÷´¦Àí JSP ͨ³£ÐèÒª½øÐÐÏÂÃæ 6 ¸ö²½Ö裺
·ÖÎö JSP ´úÂ룻
Éú³É Java ´úÂ룻
½« Java ´úÂëдÈë´æ´¢Æ÷£»
Æô¶¯ÁíÍâÒ»¸ö½ø³Ì²¢ÔËÐбàÒëÆ÷±àÒë Java ´úÂ룻
½«ÀàÎļþдÈë´æ´¢Æ÷£»
·þÎñÆ÷¶ÁÈëÀàÎļþ²¢ÔËÐУ»
µ«Èç¹û²ÉÓÃÔËÐÐʱ±àÒ룬¿ÉÒÔͬʱ¼ò»¯²½Öè 4 ºÍ 5£¬½ÚԼнø³ÌµÄ¿ªÏúºÍдÈë´æ´¢Æ÷µÄÊä³ö¿ªÏú£¬Ìá¸ßϵͳЧÂÊ¡£Êµ¼ÊÉÏ£¬ÔÚ JDK 5 ÖУ¬Sun Ò²ÌṩÁ˵÷ÓñàÒëÆ÷µÄ±à³Ì½Ó¿Ú¡£È»¶ø²»Í¬µÄÊÇ£¬ÀÏ°æ±¾µÄ±à³Ì½Ó¿Ú²¢²»ÊDZê×¼ API µÄÒ»²¿·Ö£¬¶øÊÇ×÷Ϊ Sun µÄרÓÐʵÏÖÌṩµÄ£¬¶øаæÔò´øÀ´Á˱ê×¼»¯µÄÓŵ㡣
РAPI µÄµÚ¶þ¸öÐÂÌØÐÔÊÇ¿ÉÒÔ±àÒë³éÏóÎļþ£¬ÀíÂÛÉÏÊÇÈκÎÐÎʽµÄ¶ÔÏó —— Ö»Òª¸Ã¶ÔÏóʵÏÖÁËÌض¨µÄ½Ó¿Ú¡£ÓÐÁËÕâ¸öÌØÐÔ£¬ÉÏÊöÀý×ÓÖеIJ½Öè 3 Ò²¿É
Ïà¹ØÎĵµ£º
Ó¦ÓóÌÐò·þÎñÆ÷ÊÇÒ»¸ö Java ½ø³Ì£¬ËüÐèÒª Java ÐéÄâ»ú£¨JVM£©²ÅÄÜÔËÐÐÒÔ¼°Ö§³ÖËüËùÔËÐÐµÄ Java Ó¦ÓóÌÐò¡£ÔÚÅäÖÃÓ¦ÓóÌÐò·þÎñÆ÷µÄ¹ý³ÌÖУ¬¿ÉÒÔ¶ÔÉèÖýøÐÐ΢µ÷ÒÔ¸ÄÉÆϵͳ¶Ô JVM µÄʹÓ÷½Ê½¡£
¹ØÓÚ±¾ÈÎÎñ
JVM Ϊ»ùÓÚ Java µÄÓ¦ÓóÌÐòÌṩÁËÔËÐÐʱִÐл·¾³¡£WebSphere Application Server ÊÇ JVM ÔËÐÐʱ»·¾³Óë»ùÓÚ Java µÄ ......
ÒòΪÏîÄ¿ÓиöÐèÇó£¬ÒªÇóÄܹ»ÔÚij¸öÔ¤¶¨Ê±¼ä¶ÔÌض¨±¨±í½øÐÐ×Ô¶¯´òÓ¡¡£±¨±íµÄÐÎʽÖ÷ÒªÊÇexcel¡£Èç¹ûÊÇc++»òÕßc#ʲôµÄ£¬¼òÖ±ÊÇС²ËÒ»µú¡£¿Éϧ£¬Æ«Æ«ÊÇjavaʵÏÖ¡£²¢ÇÒ£¬ÕâÓÖ²»Í¬ÓÚ³£¼ûµÄÒ³ÃæÊÖ¹¤´òÓ¡£¬¿ÉÒÔͨ¹ýjavascriptµ÷ÓôòÓ¡»úÀ´ÊµÏÖ¡£ÓÚÊǺõ£¬¿ªÊ¼ÃþË÷ÈçºÎʵÏָù¦ÄÜ¡£
Ê×Ï ......
½Ó¿Ú±¾ÖÊÉϾÍÊÇÓÉÖƶ¨ÕßÀ´Ðµ÷ʵÏÖÕߺ͵÷ÓÃÕßÖ®¼äµÄ¹Øϵ¡£
ËùÒÔͨ³£ËµµÄ“ÃæÏò½Ó¿Ú±à³Ì”¿ÉÒÔÀí½âΪ£º
Ö»ÓÐʵÏÖÕߺ͵÷ÓÃÕ߶¼×ñÑ“ÃæÏò½Ó¿Ú±à³Ì”Õâ¸ö×¼Ôò£¬Öƶ¨ÕßµÄе÷Ä¿µÄ²ÅÄÜ´ïµ½¡£
Ò»¸öÀÏÉú³£Ì¸µÄÀý×Ó¾ÍÊÇJDBC¡£
ºÜ¶àÈ˷ѽ⣺¼ÈÈ»ÎÒÿÁ¬½ÓÒ»ÖÖÊý¾Ý¿â£¨Èçmysql£©¶¼ÒªÊÂÏȲ¿ÊðÇý¶¯³ÌÐò£¬ÄÇÎÒÖ±½ ......
public class Factory {
private static Factory factory;
private static Object classLock=Factory.class;
private Factory(){}
public static Factory getFactory(){
synchronized(classLock){
......
package test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class Test {
public static void main(String arg[]) {
String fileName = "E:\\share\\test.txt";
File file = new File(fileName);
......