ÈçºÎÒÔJavaʵÏÖÍøÒ³½Øͼ¼¼Êõ
½ñÌì¿´µ½Ä³ÍøÓѹØÓÚ“ÈçºÎÒÔJavaʵÏÖÍøÒ³½Øͼ¼¼Êõ”µÄ×ÉѯÌû£¬ÓÉÓÚ³öÏÖ¸Ã×ÉѯµÄµØµã·Ç³£²»ÊʺϽϳ¤»Ø¸´£¬¹ÊÒÔ²©ÎÄÐÎʽ»Ø´ð¡£
ÊÂʵÉÏ£¬Èç¹ûÄúÏëÒÔJavaʵÏÖÍøÒ³½Øͼ£¬Ò²¾ÍÊÇ“ÊäÈëÒ»¶ÎÍøÖ·£¬¼¸ÃëÖÓ¹ýºó¾ÍÄܽØÈ¡Ò»ÕÅÍøÒ³ËõÂÔͼ”µÄЧ¹û¡£ÄÇô£¬ÄúÖÁÉÙÓÐ3ÖÖ·½Ê½¿ÉÒÔÑ¡Ôñ¡£
1¡¢×îÖ±½ÓµÄ·½Ê½——ʹÓÃRobot
·½·¨Ïê½â£º¸Ã·½·¨ÀûÓÃRobatÌṩµÄÇ¿´ó×ÀÃæ²Ù×÷ÄÜÁ¦£¬Ó²ÐÔµ÷ÓÃä¯ÀÀÆ÷´ò¿ªÖ¸¶¨ÍøÒ³£¬²¢½«ÍøÒ³ÐÅÏ¢±£´æµ½±¾µØ¡£
ÓÅÊÆ£º¼òµ¥Ò×Ó㬲»ÐèÒªÈκεÚÈý·½²å¼þ¡£
ȱµã£º²»ÄÜͬʱ´¦Àí´óÁ¿Êý¾Ý£¬¼¼Êõº¬Á¿¹ýµÍ£¬ÊôÓÚÓ¦¼±Ðͼ¼ÇÉ¡£
ʵÏÖ·½·¨£ºÊ¹ÓÃÈçÏ´úÂë¼´¿É¡£
public static void main(String[] args) throws MalformedURLException,
IOException, URISyntaxException, AWTException {
//´Ë·½·¨½öÊÊÓÃÓÚJdK1.6¼°ÒÔÉÏ°æ±¾
Desktop.getDesktop().browse(
new URL("http://google.com/intl/en/").toURI());
Robot robot = new Robot();
robot.delay(10000);
Dimension d = new Dimension(Toolkit.getDefaultToolkit().getScreenSize());
int width = (int) d.getWidth();
int height = (int) d.getHeight();
//×î´ó»¯ä¯ÀÀÆ÷
robot.keyRelease(KeyEvent.VK_F11);
robot.delay(2000);
Image image = robot.createScreenCapture(new Rectangle(0, 0, width,
height));
BufferedImage bi = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
Graphics g = bi.createGraphics();
g.drawImage(image, 0, 0, width, height, null);
//±£´æͼƬ
ImageIO.write(bi, "jpg", new File("google.jpg"));
}
2¡¢×î³£¹æµÄ·½Ê½——ÀûÓÃJNI£¬µ÷ÓõÚÈý·½C/C++×é¼þ
·½·¨Ïê½â£ºÄ¿Ç°À´½²£¬JavaÁìÓò¶ÔÓÚÍøÒ³½Øͼ×é¼þµÄ¿ª·¢Ã÷ÏÔ²»×㣨ÉÌ»ú£¿£©£¬µ±ÄúÐèÒªÍê³É´ËÖÖ²Ù×÷ʱ£¬ËãµÃÉÏÅöµ½ÁËJavaµÄÈíÀß¡£µ«ÊÇ£¬ÖÚËùÖÜÖªJavaÒ²ÓµÓÐÇ¿´óµÄJNIÄÜÁ¦£¬¿ÉÒÔÇáÒ×½«C/C++¿ª·¢µÄͬÀà×é¼þÒýΪ¼ºÓá£
ÓÅÊÆ£ºÊµÏÖ¼òµ¥£¬Ö»ÐèÒª·â×°¶ÔÓ¦µÄDLLÎļþ£¬¾Í¿ÉÒÔÈÃJavaʵÏÖͬÀ๦ÄÜ¡£
ÁÓÊÆ£ºÍ¬ÆäËûJNIʵÏÖÒ»Ñù£¬ÔÚ¿çƽ̨ʱ´æÔÚÒþ»¼£¬¶øÇÒÄúµÄ³ÌÐò½«²»ÔÙÊôÓÚ´¿JavaÓ¦Óá£
ʵÏÖ·½·¨£º¿É²Î¼û´ËÓÃÀý£¬¾ßÌå·â×°ºÎÖÖC/C++×é¼þÇë×ÔÐÐÑ¡Ôñ¡£
PS£ºÊ¾ÀýÀ´Ô´ÓÚACA HTML to Image ConverterÏîÄ¿£¨http://www.acasystems.com/en/web-thumb-activex/faq-con
Ïà¹ØÎĵµ£º
À´Ô´: http://xfshiyuan.blog.sohu.com/100496073.html
ÓÉÓÚͬһ½ø³ÌµÄ¶à¸öÏ̹߳²ÏíͬһƬ´æ´¢¿Õ¼ä£¬ÔÚ´øÀ´·½±ãµÄͬʱ£¬Ò²´øÀ´ÁË·ÃÎʳåÍ»Õâ¸öÑÏÖصÄÎÊÌâ¡£JavaÓïÑÔÌṩÁËרÃÅ»úÖÆÒÔ½â¾öÕâÖÖ³åÍ»£¬ÓÐЧ±ÜÃâÁËͬһ¸öÊý¾Ý¶ÔÏ󱻶à¸öÏß³Ìͬʱ·ÃÎÊ¡£
¡¡¡¡ÐèÒªÃ÷È·µÄ¼¸¸öÎÊÌ⣺
¡¡¡¡1)synchronized¹Ø¼ü×Ö¿É ......
×Ô¶¯×°ÏäºÍ×Ô¶¯²ðÏäÊÇjava5.0°æ±¾ÒýÈëµÄ£¬ÄÜ×Ô¶¯½«»ù±¾ÀàÐÍת»»Îª¶ÔÓ¦µÄ»ù±¾ÀàÐÍ°ü×°¶ÔÏó£¬ÄÇôÎÒÃDZȽÏÒ»ÏÂËûÃǵÄÐÔÄÜÇé¿ö¡£
package com.wmmad.test;
import junit.framework.TestCase;
/**
* @author madding.lip
*
* <pre>
* class: compare the autoboxing and unboxing and normal's performance
......
package homework01;
public class TestWhile {
public static double factorial(int n) //Çó½×³Ëº¯Êý
{
if(n==0) return 1;
else return n* factorial(n-1);
}
public static void main(String[] args) {
System.out.println(factorial(170));//test:ÄÜ´òÓ¡³öÀ´£ ......
public class OuterClass
{
public class InnerClass
{
public int code = 100;
}
public static void main(String[] args)
{
OuterClass outer = new OuterClass();
OuterClass.InnerClass o = outer.new InnerClass();
System. ......
1¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏ󣺳éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£¬²¢ÇÒÔÊÐíºÍ ......