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

flexͨ¹ýblazedsÓëjavaͨÐŵÄСÀý×Ó

ºÜ¼òµ¥µÄСÀý×Ó£¬ÊʺϳõѧÕßÀí½â
1£¬JavaFlex.java
package flex;
public class JavaFlex {
public String helloJavaFlex(String name) {
return name;
}
}

2£¬remoting-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service" class="flex.messaging.services.RemotingService">
<adapters>
<adapter-definition id="java-object"
class="flex.messaging.services.remoting.adapters.JavaAdapter"
default="true" />
</adapters>
<default-channels>
<channel ref="my-amf" />
</default-channels>
<destination id="firstJavaFlex">
<properties>
<source>flex.JavaFlex
</source>
</properties>
</destination>
</service>
3£¬testflex.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- ½«·Ç¿ÉÊÓÔªËØ£¨ÀýÈç·þÎñ¡¢Öµ¶ÔÏ󣩷ÅÔÚ´Ë´¦ -->
<s:RemoteObject id="selectHello" destination="firstJavaFlex" fault="error(event)"/>
</fx:Declarations>
<fx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.events.ResizeEvent;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;

[Bindable]
private var arraylist:ArrayCollection = new ArrayCollection([
{name:"ÄãºÃ",data:"ÄãºÃ£¡"},
{name:"ÄãÃǺÃ",data:"ÄãÃǺã¡"},
{name:"´ó¼ÒºÃ",data:"´ó¼ÒºÃ£¡"},
]);
private function changehandler(event:Event):void{
selectHello.helloJavaFlex(selected.selectedItem.data);
selectHello.addEventListener(ResultEvent.RESULT,remoteResult);
}
private function remoteResult(event:ResultEvent):void{
Alert.show(event.result.toString());
resultmess.text = event.result.toString();
}
priv


Ïà¹ØÎĵµ£º

Java°´ÐжÁÈ¡Îı¾Îļþ

import java.io.*;
public class IoTest
{
public static void main(String[] args)
{
String s;
s=calculate();
System.out.println(s);
}
static String calculate()
{
StringBuffer sb=new StringBuffer("");
try{
FileReader re ......

Flex Óë Asp.Net ͨ¹ý Remoting ·½Ê½½øÐÐͨѶ

Flex
Óë Asp.Net ͨ¹ý Remoting ·½Ê½½øÐÐͨѶ
Flex Óë Asp.Net ͨ¹ý Remoting ·½Ê½½øÐÐͨѶ (Ò»)http://hi.baidu.com/tsengyuen/blog/item/644e98a3353f7287471064ef.html
Flex Óë Asp.Net ͨ¹ý Remoting ·½Ê½½øÐÐͨѶ (¶þ)http://hi.baidu.com/tsengyuen/blog/item/af02730d58d6d7266059f3e8.html
Flex Óë Asp.Net ͨ ......

Java¶þ·Ö·¨

Ìù¶Î´úÂë,ÓÐÉÙÐí×¢ÊÍ:
package ibees;
import java.util.Arrays;
public class BinarySearch {

/**
* @param args
*/
public static void main(String[] args) {
double[] src = new double[]{1.3,9.9,10.89,12.89,89.0};
System.out.println(new BinarySearch().binarySearch(src, 89.0));
}

......

java ½øÖÆ×ª»»

public class Test { 
      public static void main(String args[]) {  
        System.out.println(Integer.toBinaryString(20));   //Ê®½øÖÆ-->2½øÖÆ  
        System ......

javaÉè¼ÆÄ£Ê½Ðò

³ÌÐòÉè¼ÆÊǽâ¾öÎÊÌâ˼·µÄ¾ßÌ廯.¾ÍÏñ½¨ÔìÒ»×ù·¿×ÓÒ»Ñù£¬ÓÃʲôÑùµÄ²ÄÁÏ,½¨Ôìʲô·ç¸ñµÄ½¨Öþ,¾ßÌåÿ¸öλÖÃÊÇʲô... ²»Í¬µÄ½¨Öþʦ»áÓв»Í¬µÄ·½·¨. ¶ø°ÑÍê³ÉÄ³Ò»ÌØ¶¨ÎÊÌâµÄ½â¾ö˼·¹æ·¶Ò»Ï ¾Í¿ÉÒÔ³Æ×÷ΪһÖÖÉè¼ÆÄ£Ê½.
³ÌÐòÉè¼ÆÖÐÉè¼ÆÄ£Ê½ÎªÎÒÃÇÔÚijһÎÊÌâÓòÌṩÁËÒ»ÖÖÁ¼ºÃµÄʵÏÖ·½·¨²Î¿¼£¬¿ÉÒÔ´ó´óʵÏÖ¸´Óú͸ßЧ¡£
ÏÂÃæÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ