JADE (NetBeans IDE 6.8) and Rev Studio 4.0

zeeshan aamir shani.runrev at gmail.com
Fri Mar 19 18:01:26 EDT 2010


Hay to all,



I want to communicate the JADE (NetBeans IDE 6.8 (Build 200912041610)

) and RunRev (Rev Studio Build 950 Version 4.0.0) with each other through
Socket Programming.



*Product Version:* NetBeans IDE 6.8 (Build 200912041610)

*Java:* 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13

*System:* Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)



*Rev Studio* Build 950 Version 4.0.0





RunRev and JADE are installed on same computer.



Kindly Guide me some links where I find the examples how they both
communicate with each other.



I am beginner at this time of RunRev.





I have simple program in JADE

…………………………………………………………………………………………



//Code for Server.java  (JADE)
package Server;

import java.io.DataInputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
public static void main (String[] args) throws IOException{
ServerSocket server=new ServerSocket(6800);
System.out.println("Server Started");
Socket client= server.accept();
DataInputStream in= new DataInputStream(client.getInputStream());

System.out.println("Client Syas: " + in.readUTF());
}
}

.................................................................................................
/7code for client Socket. (JADE)


package Cleint;

import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;

public class Cleint {
public static void main (String[] args) throws IOException {
Socket client= new Socket("localhost",6800);
System.out.println("Connected to server");
DataOutputStream out = new DataOutputStream(client.getOutputStream());
out.writeUTF ("AllowServer");


}

}
.....................................................................

*RunRev* Main

function StackPath
   local tPath
   --
   put the effective filename of this stack into tPath
   set the itemDelimiter to slash
   delete item -1 of tPath
   --
   return tPath
end StackPath
////////////////////////////////////////////
*For Server  Communication Button in Rev*


on mouseUp
   local tDefaultFolder, tResult
   --
   put the defaultFolder into tDefaultFolder
   set the defaultFolder to StackPath()
   --
   put shell("Server 6800") into tResult
   --
   set the defaultFolder to tDefaultFolder
   answer tResult
end mouseUp

*
Clinet button coading in Rev
*



on mouseUp
    local tDefaultFolder, tProcess
   --
   put the defaultFolder into tDefaultFolder
   set the defaultFolder to StackPath()
   --
   put "Client" into tProcess
   open process tProcess for neither
   --
   set the defaultFolder to tDefaultFolder
end mouseUp



………………………………………………………………..



I am very thankful to you for this kindness in advice.



Kindly reply me on your earliest.


Regards,

shani



More information about the use-livecode mailing list