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

AIR2.0ÈëÃŽ̳Ì:ÓëJavaÓ¦Óý»»¥

ÔÚ֮ǰµÄһƪÎÄÕÂÖУ¬ÎÒ½éÉÜÁËÈçºÎʹÓÃAIR2.0ÐÂÔöµÄNativeProcessÀàÓë±¾µØ½ø³Ì½øÐн»»¥ºÍͨѶ£¬ÔÚÄǸöÀý×ÓÀïÃæÎÒÃÇʹÓÃÁËC++
µÄ´úÂ룬ʵ¼ÊÉÏÖ»ÒªÊÇ»ùÓÚÃüÁîÐеıê×¼ÊäÈëÊä³ö£¬AIR2.0µÄÓ¦ÓÃÊÇ¿ÉÒÔºÍÈκÎÓïÑÔ±àдµÄ±¾µØ½ø³Ì½øÐн»»¥µÄ¡£ÔÚ½ñÌìµÄÀý×ÓÖУ¬ÎÒÃǽ«Ñ§Ï°ÈçºÎºÍ
Java±àдµÄ±¾µØ½ø³Ì£¨.jarÎļþ£©½øÐн»»¥¡£
ÉÏһƪ½Ì³ÌµÄµØÖ·£ºAIR2.0ÈëÃŽ̳Ì[Èý]:Óë±¾µØ½ø³ÌµÄÊý¾ÝͨѶ
×¢£ºÕâƪÎÄÕÂËùÉæ¼°µÄÔ´ÂëºÍʾÀýÀ´×ÔÓÚMihaiµÄһƪÎÄÕÂ
¡£
»Ø¹Ë
ÔÚAIR2.0ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃNativeProcess
ºÍNativeProcessInfo
ÕâÁ½¸öÀ࣬À´Æô¶¯Ò»¸ö¿ÉÖ´ÐÐÎļþ¡£µ±½ø³ÌÆô¶¯ºó£¬Äã¾Í¿ÉÒÔʹÓñê×¼ÊäÈëºÍ±ê×¼ÊäÈëÀ´Óë½ø³ÌͨѶ¡£
½áºÏJava
Ê×ÏÈ£¬Äã¿ÉÒÔÏÂÔØʾÀýÏîÄ¿
£¬Õâ¸öÏîÄ¿°üº¬ÁËÁ½¸ö²¿·Ö£º
AIR²¿·Ö£ºÊÇÒ»¸ö»ùÓÚFlex4
FrameworkµÄAIRÏîÄ¿£¬ÊµÏÖÁËÓû§½çÃ棨UI£©²¿·ÖµÄ¹¤×÷£¬½çÃæ°üº¬Á½¸ö´°¿Ú£¬ÈçÏÂͼËùʾ£¬ÓұߵĴ°¿ÚÊÇÖ÷´°¿Ú£¬Äã¿ÉÒÔ¿´µ½µ±Ç°µÄ֡Ƶ£¬È»ºóÄã
»¹¿ÉÒÔ¿ØÖÆ×ó²àµÄ¹ö¶¯ÌõÀ´·Å´óºÍËõСÓÒ²àµÄͼÏñ¡£×ó±ßµÄ´°¿ÚÔòÓÃÀ´ÏÔʾÕÚ¸ÇÇøÓòµÄͼÏñ¡£
Java²¿·Ö£º¿ØÖƶ¨Î»µ½ÆÁÄ»µÄÌض¨ÇøÓò£¬È»ºó²¶»ñ½Øͼ£¬Õâ¸ö²¿·Ö±»AIR²¿·ÖËù¿ØÖÆ¡£
ʾÀý½Øͼ£º
Äã¿ÉÒÔʹÓÃFlash Builder4£¬½«ÏÂÔصÄʾÀýÏîÄ¿µ¼È룬±àÒëÔËÐп´Ò»Ï½á¹û£¬×¢ÒâÕâ¸öÏîĿʹÓÃÁËFlex4µÄFramework£¬¶øÇÒÓпÉÄÜÐèÒªÄãÐÞ¸ÄSDKµÄÅäÖ㬲μûµÚһƪAIR2.0½Ì³Ì
¡£
ÔÚAIR²¿·ÖµÄ´úÂëÖУ¬ÎÒÃÇÐèÒª´´½¨Ò»¸öNativeProcessµÄʵÀýÀ´×¢²áÕìÌý±ê×¼Êä³öʼþ¡£Ê×ÏÈÎÒÃÇÐèÒªµ÷ÓÃJavaÃüÁÆô¶¯ÎÒÃǵÄ.jarÎļþ£¬È»ºóÊäÈë“take”ÃüÁîÀ´»ñÈ¡ÆÁÄ»½Øͼ
1
:
private
var
nativeProcess:
NativeProcess;
2
:
private
var
npInfo:
NativeProcessStartupInfo;
3
:
//Æô¶¯½ø³Ì£¬²¢ÊäÈë²ÎÊý
4
:
var
arg:
Vector.<
String>
= new
Vector.<
String>
;
5
:
arg.push
(
"-jar"
)
;
6
:
arg.push
(
File.applicationDirectory.resolvePath(
"screenshot.jar"
)
.nativePath)
;
7
:
arg.push
(
"130"
)
;
8
:
arg.push
(
"100"
)
;
9
:
10
:
npInfo = new
NativeProcessStartupInfo(
)
;
11
:
//ÉèÖÃJavaµÄ·¾¶
12
:
npInfo.executable = new
File(
"/Library/Java/Home/bin/java"
)
;
13
:
npInfo.arguments
= ar


Ïà¹ØÎĵµ£º

java:Applet²¼¾ÖÎÊÌâ,ÈçºÎÌí¼Ó°´Å¥£¬±êÇ©ÎÊÌâ×ܽá


½ñÌìѧϰÁËapplet²¼¾ÖÎÊÌ⣺
°´Å¥¡¢±êÇ©ÊÇÔõÑù¼ÓÈëµ½applet³ÌÐò(ÈÝÆ÷)µ±ÖÐÈ¥µÄÄØ£¿
ÐèÒªÓõ½²¼¾ÖÈÝÆ÷¹ÜÀíÆ÷(LayoutManager)£ºËüÓÃÓÚЭÖúÈÝÆ÷È·¶¨¼ÓÈëµÄ×é¼þ(°´Å¥µÈ)Ó¦¸Ã·ÅÖõÄλÖÃ
awtÌṩÁË4Öг£ÓõIJ¼¾ÖÈÝÆ÷¹ÜÀíÆ÷
>>FlowLayout
>>BorderLayout
>>GridLayout
>>CardLayout
appletĬÈÏÊ ......

ÎҵĵÚÒ»¸öJavaС³ÌÐò

/*×÷ÓãºÓû§ÊäÈë×Ô¼ºµÄÃû×Ö£¬ÏÔʾһ¾äÎʺòÓï¡£
   ʱ¼ä£º2010Äê4ÔÂ20ÈÕ¡£
   ×÷Õߣºenfang.
*/
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class KeyboardReader¡¡//×÷Ó㺴ӼüÅ̶ÁÈëÊý¾Ý
{
¡¡¡¡private BufferedReader reader;
 
¡¡¡¡& ......

¡¶Java³ÌÐòÔ±ÉÏ°àÄǵãʶù¡·×ܽá

ÒÔÇ°¿´¹ýÕâ±¾Ê飬×î½ü¾õµÃ×÷ÕßÓÐЩ¹Ûµã»¹ÊÇͦ¶ÔÁË£¬¼ÓÉÏЩ×Ô¼ºµÄ×ܽᣬÕûÀíÏ£¬Ï£ÍûÄܶÔÒÔºó¹¤×÷ѧϰÓÐÖ¸µ¼×÷Óá£
³ÌÐòÔ±µÄÈýÖÖ¾³½ç£º
 
¿ÉÄÜÍõ¹úά´ó¸ç¿´¿´ºóÈË°ÑËûµÄÈËÉúÈý¾³½ç·¢Õ¹µÃÈçºÎ¿çѧ¿Æ£¬¶àÃÅÀ࣬һ¶¨ÈªÏÂÓÐÖª£¬±¶¸ÐÐÀο°¡£¬¹þ¹þ£¡
1¡¢³ÌÐòÔ±µÚÒ»²ã¾³½ç£ºÕâ°ï¸çÃÇÒ»°ã¶¼ÊDZÏÒµÈýÄêÒÔÄڵģ¬±È½ÏÓо«Á¦£¬¶ ......

ACMÖÐʹÓÃJAVAµÄ½éÉÜ


Chapter I.
JavaµÄÓÅȱµã¸÷ÖÖÊéÉ϶¼ÓУ¬ÕâÀïֻ˵˵ÓÃJava×öACM-ICPCµÄÌص㣺
(1) ×îÃ÷ÏԵĺô¦ÊÇ£¬Ñ§»áJava£¬¿ÉÒԲμÓJava Challenge  
(2) ¶ÔÓÚÊìϤC/C++µÄ³ÌÐòÔ±À´Ëµ£¬Java ²¢²»ÄÑѧ£¬ÕÒ±¾Ê飬һÁ½ÖÜÒµÓàʱ¼ä¾Í¿ÉÒԸ㶨ÁË¡£µ±È»£¬ÕâÀïÖ»ÊÇÖ¸Ò»°ã±à³Ì£¬ÏëÊìϤËùÓеÄJava¿â»¹ÊÇÐèҪЩʱ¼äµÄ¡£ÊÂʵÉÏ£¬Java Ö ......

java ƽºâ¶þ²æÊ÷ʵÏÖ

////////////////////////////////////////////////½ÚµãÀà TreeNode.java    //////////////////////////
package com.tree;
    class TreeNode {//°ü·ÃÎÊȨÏÞ
    long data ;
    long x,y;
    String adrr;
    Tre ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ