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

ÀûÓÃjavax.tools¶¯Ì¬±àÒëÖ´ÐÐjava´úÂë

²Î¿¼£ºÊ¹Óà javax.tools ´´½¨¶¯Ì¬Ó¦ÓóÌÐò
¡¡¡¡javax.tools °üÊÇÒ»ÖÖÌí¼Óµ½ Java SE 6 µÄ±ê×¼ API£¬¿ÉÒÔʵÏÖ Java Ô´´úÂë±àÒ룬ʹÄúÄܹ»Ìí¼Ó¶¯Ì¬¹¦ÄÜÀ´À©Õ¹¾²Ì¬Ó¦ÓóÌÐò¡£±¾ÎĽ«Ì½²éjavax.tools°üÖÐÌṩµÄÖ÷ÒªÀ࣬ÒÔJava±í´ïʽ±íʾ¼ÆËãÒ»¸öÊýÖµº¯Êýy=x*x+x¡£¸ü¶àÏêÇéÇë²Î¿¼¡¶Ê¹Óà javax.tools ´´½¨¶¯Ì¬Ó¦ÓóÌÐò¡·ºÍjavax.tools API docs
¡£
complier.CharSequenceCompilerÔ´Â룺
package complier;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.tools.DiagnosticCollector;
import javax.tools.JavaCompiler;
import javax.tools.JavaFileObject;
import javax.tools.StandardLocation;
import javax.tools.ToolProvider;
import javax.tools.JavaCompiler.CompilationTask;
/**
* ±àÒë{@link CharSequence}ÐÎʽµÄÔ´Â룬²¢ÊµÀý»¯£¬·µ»ØÒ»¸öʵÀý¡£<br>
* Ó÷¨Ê¾Àý£¨ÒÔ±àÒëMyInterfaceµÄÒ»¸öʵÏÖÀàΪÀý£©£º
*
* <pre>
* MyInterface instance = null;
* JavaStringCompiler<MyInterface> compiler = new JavaStringCompiler<MyInterface>(null, null);
* try {
* Class<MyInterface> newClass = compiler.compile("com.mypackage.NewClass",
* stringContaininSourceForNewClass, new Class<?>[] { MyInterface.class });
* instance = newClass.newInstance();
* } catch (JavaStringCompilerException ex) {
* ex.printStackTrace();
* } catch (IllegalAccessException ex) {
* ex.printStackTrace();
* }
* instance.someOperation(someArgs);
* </pre>
*/
public class CharSequenceCompiler<T> {
/** ÕæÕýʹÓõıàÒëÆ÷ */
private final JavaCompiler compiler;
private final ClassLoaderImpl classLoader;
/** ±£´æ±àÒëÆ÷±àÒëÖеÄÕï¶ÏÐÅÏ¢ */
private DiagnosticCollector<JavaFileObject> diagnostics;
private final FileManagerImpl javaFileManager;
/** ±àÒë²ÎÊý */
private final List<String> options;
/**
* ¹¹ÔìÒ»¸öеÄʵÀý£¬¸ÃʵÀý³ÖÓÐÖ¸¶¨µÄclassloader
*
* @param loader
*


Ïà¹ØÎĵµ£º

FlexÖÐRemoteObjectÓëjavaµÄ½»»¥ÊµÀý½²½â

 Õ⼸ÌìÒ»Ö±ÔÚÑо¿FlexÖÐRemoteObjectÓëjavaµÄ½»»¥ÎÊÌ⣬¿ÉÒ»Ö±²»³É¹¦£¬½ñÌìÖÕÓڳɹ¦ÁË£¬µ«ÊÇ»¹ÓÐһЩÒÉ»ó£¬Ó¦¸Ã¼ÌÐøŬÁ¦¡£
ÏÂÃæÊÇÎҵľ­¹ýºÍÅöµ½µÄ´íÎó£º
£¨1£©ÏÂÔغͰ²×°lcds.
ÔÚ°²×°Ä¿Â¼Ï»áÓÐÈçÏÂÎļþ£¬ÆäÖÐlcds.war¿ÉÒÔ×÷ΪÎÒÃÇ¿ª·¢FlexÓëjava½»»¥µÄÄ£°æ£¬°ÑÕâ¸öÎļþ¿¼µ½ÄãtomcatµÄwebappsÏ£¨µ±È»ÕâÖÖÇé¿öÊÇÄ ......

JavaÖеÄBigDecimalµÄʹÓÃ

BigDecimalÀà
Ë«¾«¶È¸¡µãÐͱäÁ¿double¿ÉÒÔ´¦Àí16λÓÐЧÊý¡£ÔÚʵ¼ÊÓ¦ÓÃÖУ¬ÐèÒª¶Ô¸ü´ó»òÕ߸üСµÄÊý½øÐÐÔËËãºÍ´¦Àí¡£JavaÔÚjava.math°üÖÐÌṩµÄAPIÀàBigDecimal£¬ÓÃÀ´¶Ô³¬¹ý16λÓÐЧλµÄÊý½øÐо«È·µÄÔËËã¡£±í5.7ÖÐÁгöÁËBigDecimalÀàµÄÖ÷Òª¹¹ÔìÆ÷ºÍ·½·¨¡£
±í5.7 BigDecimalÀàµÄÖ÷Òª¹¹ÔìÆ÷ºÍ·½·¨
¹¹ÔìÆ÷ÃèÊö
BigDecimal(in ......

java Socket±à³Ì»ù´¡

 ×î¼òµ¥µÄ·þÎñÆ÷½ÓÊܵ¥Óû§ÇëÇóµÄsocket±à³ÌÄ£ÐÍ£¬´úÂëдµÃ²»ºÃ£¬Ö»ÊÇÓÃÀ´²ûÃ÷Òâ˼
 client side
import java.net.*;
import java.util.*;
import java.io.*;
public class Client {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
tr ......

Javaѧϰ֮·£º²»×ßÍä·£¬¾ÍÊǽݾ¶

1£®ÈçºÎѧϰ³ÌÐòÉè¼Æ£¿ &nbsp;
JAVAÊÇÒ»ÖÖƽ̨£¬Ò²ÊÇÒ»ÖÖ³ÌÐòÉè¼ÆÓïÑÔ£¬ÈçºÎѧºÃ³ÌÐòÉè¼Æ²»½ö½öÊÊÓÃÓÚJAVA£¬¶ÔC++µÈÆäËû³ÌÐòÉè¼ÆÓïÑÔÒ²Ò»Ñù¹ÜÓá£Óбà³Ì¸ßÊÖÈÏΪ£¬JAVAÒ²ºÃCÒ²ºÃûʲô·Ö±ð£¬ÄÃÀ´¾ÍÓá£ÎªÊ²Ã´ËûÃÇÄÜ´ïµ½Èç´Ë¾³½ç£¿ÎÒÏëÊÇÒòΪ±à³ÌÓïÑÔÖ®¼äÓй²Í¨Ö®´¦£¬Áì»áÁ˱à³ÌµÄ¾«Ë裬×ÔÈ»Äܹ»×öµ½Ò»Í¨°Ùͨ¡£Èç ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ