• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Socket communication

 
Mahesh Narayanan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create interprocess communication between two application. The sender application is Amibroker. The receiver is MotiveWave. Amibroker takes VBScript and MotiveWave understands Java. I have working code to communicate between Amibroker and a Java Class. I posting the code below

VBScript Code



JAVA CODE


This works flawlessly everytime i trigger the VBScript Code I can see "Buy" in the Java console. The problem arises after this point. The Java code needs to be wrapped into a motivewave custom class known as a Strategy and then compiled into a jar and then the jar needs to be loaded into Motivewave. When I create the strategy It works only once and then it fails. Below is the code of the strategy. Another problem is there is very little debug options as the this piece of code runs within MotiveWave. Right now I am not able to figure out how to to proceed.




[HENRY: Fixed Code Tags]
 
Tim Moores
Bartender
Posts: 3128
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elsewhere I advised you of the "don't println to a socket" issue which your code is susceptible to. Have you ascertained that you're not running into it here?
 
Mahesh Narayanan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I did. I am not writing a line into the socket. Even otherwise I have VBScript code and Java code that are working perfectly. The communication happen flawlessly. It's only when I convert the Java code into a custom Java class that is then loaded into MotiveWave that the issue occurs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic