I want to use DDE communication with java and java eclipse editor to run some simple code. I imported the called library pretty-tools-JDDE-2.0.3.jar to my project but in vain - DDEClient and other DDE type not recognized. Here is the code :
public class Testdde {
public static void main(String[] args) {
DDEClient client;
Conversation url = null;
client = DDEClient.getInstance();
try {
url = client.connect("Iexplore", "WWW_OpenURL");
} catch (DDEException e) {
System.out.println("No running instance of Internet Explorer is found. Stopping.");
e.printStackTrace();
client.close();
return;
}
System.out.println("Connected to Internet Explorer");
System.out.println("Opening \"http://www.java.com/\" in a new window");
try {
url.request("http://www.java.com/,,0");
} catch(DDEException e) {
e.printStackTrace();
}
try {url.close();} catch (Exception ignore) {}
client.close();
}
}