ÈçºÎÒÔ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
Ïà¹ØÎĵµ£º
Õ⼸ÌìÍøÂçÓÐÎÊÌ⣬ËùÒÔ½ñÌìÒ»Æð×ܽá³öÀ´
ÀàµÄС½á
1£¬Àà³éÏóÁËËùÓоßÓÐÒ»¶¨¹²ÐÔµÄʵÌåµÄ¹²Í¬Ìسơ£Ò»¸öÀàÖУ¬±äÁ¿ÓÃÀ´±íʾÊôÐÔ£¬·½·¨ÓÃÀ´±íʾ¹¦ÄÜ£¬Àà°ÑÊý¾ÝºÍ¶ÔÊý¾ÝµÄ²Ù×÷·â×°³ÉÒ»¸öÕûÌå¡£³ÌÐòÓïÑÔÖУ¬Í¨¹ýÀà´´½¨¶ÔÏó¡£
2£¬¹¹Ô캯ÊýµÄ×÷ÓÃÔÚÓÚÉùÃ÷ÀàµÄ¶ÔÏóºó£¬ÎªÆä·ÖÅä´¢´æµ¥Ôª£¬¼´´´½¨ÊµÀý¡£
3,²»Í¬¶ÔÏóµÄʵÀý±äÁ¿½« ......
Ò»Ö±ÒÔÀ´¶¼ÊÇ΢ÈíµÄËÀÖÒ£¬ÎÒÒ»Ö±¹ÌÖ´µÄʹÓÃ×Å΢ÈíµÄ²úÆ·¡£´Ó2001Äêµ½½ñÄê2010Ä꣬ÒѾ¶È¹ýÁË9ÄêµÄʱ¹â£¬¿´×ÅËüµÄ½ø²½£¬Ò²¿´µ½ÁËjava¶ÔËüµÄ²Ïʳ¡£´Ó×î³õ´ó¼Ò¶Ô΢ÈíÊÇ·ñÒ»Ö»¶À´ó£¬µ½ÏÖÔÚÎÒµ£ÐÄvsϵÁвúÆ·ÊÇ·ñ±»javaËùÍÌû¡£
Îҵĵ£ÐIJ»ÊÇûÓеÀÀí£¬ÉõÖÁÎÒΪÁ˼á³ÖÎÒµÄ΢Èí·Ïß¶ø·ÅÆúÁËÏÖÔڵŤ×÷¡£
ÔÚ×öСÐÍÏîÄ¿ºÍ×ÀÃæÐÍÏîÄ ......
һЩjavaÀàÖÐΪʲôÐèÒªÖØÔØ serialVersionUID ÊôÐÔ¡£
ÔÚJavaÖУ¬Èí¼þµÄ¼æ
ÈÝÐÔÊÇÒ»¸ö´óÎÊÌ⣬ÓÈÆäÔÚʹÓõ½¶ÔÏó´®ÐÐÐÔµÄʱºò£¬ÄÇôÔÚijһ¸ö¶ÔÏóÒѾ±»´®Ðл¯ÁË£¬¿ÉÊÇÕâ¸ö¶ÔÏóÓÖ±»Ð޸ĺóÖØÐ²¿ÊðÁË£¬ÄÇôÔÚÕâÖÖÇé¿öÏ£¬
ÓÃÀÏÈí¼þÀ´¶ÁÈ¡ÐÂÎļþ¸ñʽËäÈ»²»ÊÇʲôÄÑÊ£¬µ«ÊÇÓпÉÄܶªÊ§Ò»Ð©ÐÅÏ¢¡£
serialVersionUID
À´½â ......
ÎÒºÜϲ»¶Ñ§Ï°java£¬ÄÇÊÇÔÚÎÒÕýʽÉÏÁËÕâ¸ö¿Îºó¾Íϲ»¶ÉÏÁË£¬ÎÒ¾õµÃÎÒѧµÄÖ»ÊÇÒ»°ã£¬µ«ÊÇÎÒÏë°ÑÎÒµÄһЩ¸öÈ˾ÑéдÏÂÀ´£¬ºÇºÇ¡£¡£¡£¡£¡£
javaÊÇÃæÏò¶ÔÏóµÄ±à³ÌÓïÑÔ£¬ÎÒÒÔǰֻÊdzõ²½Ñ§Ï°¹ýc£¬Ñ§Ï°javaʱһЩ»ù±¾µÄÓï·¨Ö»ÊÇ¿´ÁË¿´£¬ÒòΪºÍcÊDz¶àµÄ£¬µ«ÊǺóÀ´²»¶ÏµØÑ§Ï°·¢ÏÖ¡£Ñ§Ï°javaÒªºÃºÃÊìϤ¸÷ÖÖ¸÷ÑùµÄÀֻ࣬Ҫ½«¸÷ÖÖÀàÊì ......
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. ......